Permalink
Browse files

Qt: Fix memory leak in LogController

  • Loading branch information...
endrift committed Jul 4, 2018
1 parent 2e330b9 commit 3be77c162247f5380bd1ec226ab4bf7ab800efcb
Showing with 5 additions and 0 deletions.
  1. +4 −0 src/platform/qt/LogController.cpp
  2. +1 −0 src/platform/qt/LogController.h
@@ -25,6 +25,10 @@ LogController::LogController(int levels, QObject* parent)
}
}
+LogController::~LogController() {
+ mLogFilterDeinit(&m_filter);
+}
+
LogController::Stream LogController::operator()(int category, int level) {
return Stream(this, category, level);
}
@@ -35,6 +35,7 @@ Q_OBJECT
public:
LogController(int levels, QObject* parent = nullptr);
+ ~LogController();
int levels() const { return m_filter.defaultLevels; }
mLogFilter* filter() { return &m_filter; }

0 comments on commit 3be77c1

Please sign in to comment.