0
0
mirror of https://github.com/yse/easy_profiler.git synced 2025-01-14 00:27:55 +08:00

(EasyMainWindow) Memory leak issue

This commit is contained in:
Victor Zarubkin 2016-08-30 23:15:16 +03:00
parent 9560c5b5cf
commit cbcfe4c184

View File

@ -421,6 +421,9 @@ void EasyMainWindow::onFileReaderTimeout()
EASY_GLOBALS.profiler_blocks.swap(threads_map);
EASY_GLOBALS.descriptors.swap(descriptors);
typedef decltype(EASY_GLOBALS.gui_blocks) gui_blocks_t;
gui_blocks_t().swap(EASY_GLOBALS.gui_blocks);
EASY_GLOBALS.gui_blocks.resize(nblocks);
memset(EASY_GLOBALS.gui_blocks.data(), 0, sizeof(::profiler_gui::EasyBlock) * nblocks);
for (decltype(nblocks) i = 0; i < nblocks; ++i) {