[vlmc-devel] VLCBackend: Release LibVLCInstance when destroying backend

Hugo Beauzée-Luyssen git at videolan.org
Sun Mar 30 17:48:40 CEST 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Mar 30 14:58:31 2014 +0300| [e74c5f5c43724b0dce9e6c37447d762f6e93375c] | committer: Hugo Beauzée-Luyssen

VLCBackend: Release LibVLCInstance when destroying backend

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

 src/Backend/VLC/VLCBackend.cpp |    5 +++++
 src/Backend/VLC/VLCBackend.h   |    1 +
 2 files changed, 6 insertions(+)

diff --git a/src/Backend/VLC/VLCBackend.cpp b/src/Backend/VLC/VLCBackend.cpp
index 4aea108..4a6a95e 100644
--- a/src/Backend/VLC/VLCBackend.cpp
+++ b/src/Backend/VLC/VLCBackend.cpp
@@ -53,6 +53,11 @@ VLCBackend::VLCBackend()
     assert( m_vlcInstance != NULL );
 }
 
+VLCBackend::~VLCBackend()
+{
+    delete m_vlcInstance;
+}
+
 ISource*
 VLCBackend::createSource(const char *path)
 {
diff --git a/src/Backend/VLC/VLCBackend.h b/src/Backend/VLC/VLCBackend.h
index b757969..3006b87 100644
--- a/src/Backend/VLC/VLCBackend.h
+++ b/src/Backend/VLC/VLCBackend.h
@@ -38,6 +38,7 @@ class VLCBackend : public IBackend, public Singleton<VLCBackend>
 {
     public:
         VLCBackend();
+        virtual ~VLCBackend();
         virtual ISource*        createSource( const char* path );
         virtual IMemorySource*  createMemorySource();
         virtual void            setLogHandler( void* data, LogHandler logHandler );



More information about the Vlmc-devel mailing list