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

Sergey Radionov git at videolan.org
Fri Mar 16 00:11:10 CET 2012


npapi-vlc | branch: master | Sergey Radionov <RSATom at gmail.com> | Tue Mar 13 21:32:18 2012 +0700| [9ef3f5b75ead0f22dbe726d1d1a37a1539de30b4] | committer: Jean-Baptiste Kempf

ActiveX: Fixed memory leaks in VLCControl2 destructor

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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();
 };



More information about the vlc-commits mailing list