From 433f0c594a3d87054e83b9bf29aa1567baa6dd3c Mon Sep 17 00:00:00 2001 From: Pulak Malhotra <56169176+PulakIIIT@users.noreply.github.com> Date: Thu, 29 Jul 2021 17:53:08 +0530 Subject: [PATCH] Fixed mem leak --- src/core/Cutter.cpp | 2 ++ src/widgets/WindowsHeapWidget.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index f96e9395..1f8c184b 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -1616,6 +1616,8 @@ QVector CutterCore::getHeapBlocks() blocks_vector.append(block); } + + rz_list_free(blocks); return blocks_vector; } diff --git a/src/widgets/WindowsHeapWidget.cpp b/src/widgets/WindowsHeapWidget.cpp index a8278e47..f106565f 100644 --- a/src/widgets/WindowsHeapWidget.cpp +++ b/src/widgets/WindowsHeapWidget.cpp @@ -18,6 +18,8 @@ WindowsHeapWidget::WindowsHeapWidget(MainWindow *main, QWidget *parent) refreshDeferrer = dynamic_cast(parent)->createRefreshDeferrer( [this]() { updateContents(); }); + + updateContents(); } WindowsHeapWidget::~WindowsHeapWidget()