From c9159e2191a7caa52ed9c12d5afcd3389e7fa225 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 31 Oct 2018 10:14:09 +0400 Subject: [PATCH] Clear memory on MediaView closing. --- Telegram/SourceFiles/mediaview.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 1b9ba4c75..c76e6272d 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -3138,6 +3138,10 @@ void MediaView::setVisible(bool visible) { stopGif(); destroyThemePreview(); _radial.stop(); + _current = QPixmap(); + _themePreview = nullptr; + _themeApply.destroyDelayed(); + _themeCancel.destroyDelayed(); } }