[vlc-devel] commit: Qt4: small memory leak ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Jun 25 21:08:22 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Jun 25 22:10:27 2008 +0300| [c4c75ec7733e6dbceff2babccc73b21e733a8f3a]

Qt4: small memory leak

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4c75ec7733e6dbceff2babccc73b21e733a8f3a
---

 modules/gui/qt4/qt4.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index e663d75..4255a2b 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -403,8 +403,14 @@ static void Init( intf_thread_t *p_intf )
 
     /* And quit */
 
+    windowLock.lock ();
+    var_Get (p_intf, "window_widget", &val);
+    if (val.p_address)
+        delete (QPointer<MainInterface> *)val.p_address;
     val.p_address = NULL;
     var_Set (p_intf, "window_widget", val);
+    windowLock.unlock();
+
     /* Destroy first the main interface because it is connected to some slots
        in the MainInputManager */
     delete p_intf->p_sys->p_mi;




More information about the vlc-devel mailing list