[vlmc-devel] MediaLibrary: Fix memory leak

Hugo Beauzée-Luyssen git at videolan.org
Mon Mar 28 18:03:52 CEST 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 28 17:45:19 2016 +0200| [f53b4c6a877ca1e7b827f21183cc0bf1e7485075] | committer: Hugo Beauzée-Luyssen

MediaLibrary: Fix memory leak

> https://code.videolan.org/videolan/vlmc/commit/f53b4c6a877ca1e7b827f21183cc0bf1e7485075
---

 src/Gui/library/MediaLibrary.cpp | 5 +++++
 src/Gui/library/MediaLibrary.h   | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/Gui/library/MediaLibrary.cpp b/src/Gui/library/MediaLibrary.cpp
index e1a3cab..83a11b8 100644
--- a/src/Gui/library/MediaLibrary.cpp
+++ b/src/Gui/library/MediaLibrary.cpp
@@ -58,6 +58,11 @@ MediaLibrary::MediaLibrary(QWidget *parent) : QWidget(parent),
              this, SLOT( filterTypeChanged() ) );
 }
 
+MediaLibrary::~MediaLibrary()
+{
+    delete m_ui;
+}
+
 void
 MediaLibrary::changeEvent( QEvent *e )
 {
diff --git a/src/Gui/library/MediaLibrary.h b/src/Gui/library/MediaLibrary.h
index 1f04588..5d12ae6 100644
--- a/src/Gui/library/MediaLibrary.h
+++ b/src/Gui/library/MediaLibrary.h
@@ -39,6 +39,7 @@ class MediaLibrary : public QWidget
     public:
         typedef bool    (*Filter)( const Clip*, const QString& filter );
         explicit MediaLibrary( QWidget *parent = 0);
+        virtual ~MediaLibrary();
 
     protected:
         void        dragEnterEvent( QDragEnterEvent *event );



More information about the Vlmc-devel mailing list