From 2728195b9fdb01e504d96d84aae95d9436685b14 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 2 Jul 2019 22:21:09 +0200 Subject: [PATCH] neutrino.cpp: fix memleak with progressbar cache detected with LeakSanitizer Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/259d44718178a752d58372dd7a31db5eb2d3517c Author: Thilo Graf Date: 2019-07-02 (Tue, 02 Jul 2019) --- src/neutrino.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 153174551..d86d32791 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -109,7 +109,7 @@ #endif #include "gui/themes.h" #include "gui/timerlist.h" - +#include "gui/components/cc_item_progressbar.h" #include #include @@ -4289,6 +4289,9 @@ void CNeutrinoApp::ExitRun(int exit_code) dprintf(DEBUG_INFO, "exit\n"); OnShutDown(); + //cleanup progress bar cache + CProgressBarCache::pbcClear(); + StopSubtitles(); stopPlayBack(); @@ -4977,6 +4980,9 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) //usage of slots from any classes OnBeforeRestart(); + //cleanup progress bar cache + CProgressBarCache::pbcClear(); + if (recordingstatus) DisplayErrorMessage(g_Locale->getText(LOCALE_SERVICEMENU_RESTART_REFUSED_RECORDING)); else {