[vlc-devel] [PATCH] ActiveX: Fixed memory leaks in VLCControl2 destructor

rsatom at gmail.com rsatom at gmail.com
Tue Mar 13 15:32:18 CET 2012


From: Sergey Radionov <RSATom at gmail.com>

---
 activex/vlccontrol2.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index b20bf93..6dac96a 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -1219,11 +1219,11 @@ VLCControl2::VLCControl2(VLCPlugin *p_instance) :
 
 VLCControl2::~VLCControl2()
 {
-    delete _p_vlcvideo;
-    delete _p_vlcsubtitle;
-    delete _p_vlcplaylist;
-    delete _p_vlcinput;
-    delete _p_vlcaudio;
+    delete static_cast<VLCVideo*>(_p_vlcvideo);
+    delete static_cast<VLCSubtitle*>(_p_vlcsubtitle);
+    delete static_cast<VLCPlaylist*>(_p_vlcplaylist);
+    delete static_cast<VLCInput*>(_p_vlcinput);
+    delete static_cast<VLCAudio*>(_p_vlcaudio);
     if( _p_typeinfo )
         _p_typeinfo->Release();
 };
-- 
1.7.7.1.msysgit.0




More information about the vlc-devel mailing list