all repos — mgba @ 3be77c162247f5380bd1ec226ab4bf7ab800efcb

mGBA Game Boy Advance Emulator

Qt: Fix memory leak in LogController
Vicki Pfau vi@endrift.com
Wed, 04 Jul 2018 12:47:09 -0700
commit

3be77c162247f5380bd1ec226ab4bf7ab800efcb

parent

2e330b92a73e67aa6b238bb4a07840e235557082

2 files changed, 5 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/LogController.cppsrc/platform/qt/LogController.cpp

@@ -25,6 +25,10 @@ connect(this, &LogController::levelsDisabled, &s_global, &LogController::disableLevels);

} } +LogController::~LogController() { + mLogFilterDeinit(&m_filter); +} + LogController::Stream LogController::operator()(int category, int level) { return Stream(this, category, level); }
M src/platform/qt/LogController.hsrc/platform/qt/LogController.h

@@ -35,6 +35,7 @@ };

public: LogController(int levels, QObject* parent = nullptr); + ~LogController(); int levels() const { return m_filter.defaultLevels; } mLogFilter* filter() { return &m_filter; }