We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6fcd65 commit 0a00097Copy full SHA for 0a00097
src/caliper/Caliper.cpp
@@ -1372,8 +1372,8 @@ void Caliper::finalize()
1372
1373
Log(1).stream() << "Finalizing ... " << std::endl;
1374
1375
- auto channels_copy = sG->all_channels;
1376
- for (auto& channel : channels_copy) {
+ while (!sG->all_channels.empty()) {
+ auto channel = sG->all_channels.front();
1377
if (channel.mP->flush_on_exit)
1378
flush_and_write(&channel, SnapshotView());
1379
delete_channel(channel);
0 commit comments