[vlmc-devel] Ensure Core instances are properly deleted

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:59:18 2014 +0300| [26d3012631ed34ce5cfb24768e43b41e3a338c32] | committer: Hugo Beauzée-Luyssen

Ensure Core instances are properly deleted

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

 src/Main/main.cpp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/Main/main.cpp b/src/Main/main.cpp
index dfc3763..07f0f80 100644
--- a/src/Main/main.cpp
+++ b/src/Main/main.cpp
@@ -34,6 +34,7 @@
 #include "Project/ProjectManager.h"
 #include "Main/Project.h"
 #include "Backend/IBackend.h"
+#include "Main/Core.h"
 
 #include "Gui/MainWindow.h"
 #include "Gui/IntroDialog.h"
@@ -194,9 +195,11 @@ int
 VLMCmain( int argc, char **argv )
 {
 #ifdef WITH_GUI
-    return VLMCGuimain( argc, argv );
+    int res = VLMCGuimain( argc, argv );
 #else
-    return VLMCCoremain( argc, argv );
+    int res = VLMCCoremain( argc, argv );
 #endif
+    Core::destroyInstance();
+    return res;
 }
 



More information about the Vlmc-devel mailing list