aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2010-10-19 09:44:29 +0000
committerMax Horn2010-10-19 09:44:29 +0000
commit8f5eee67dbbc69979ca4b4527307277410f99956 (patch)
treef0fe3c15cb717e442b2d93ce37a947b16627e27e /engines
parentd6b7ebab16e4aa2e1e50b15ed11e4ede32520d1a (diff)
downloadscummvm-rg350-8f5eee67dbbc69979ca4b4527307277410f99956.tar.gz
scummvm-rg350-8f5eee67dbbc69979ca4b4527307277410f99956.tar.bz2
scummvm-rg350-8f5eee67dbbc69979ca4b4527307277410f99956.zip
SWORD25: Destroy singletons upon engine exit (untested, may lead to crash upon exit)
svn-id: r53609
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/sword25.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index 772c50ae01..cf33f8f56e 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -42,6 +42,10 @@
#include "sword25/package/packagemanager.h"
#include "sword25/script/script.h"
+#include "sword25/gfx/animationtemplateregistry.h" // Needed so we can destroy the singleton
+#include "sword25/gfx/renderobjectregistry.h" // Needed so we can destroy the singleton
+#include "sword25/math/regionregistry.h" // Needed so we can destroy the singleton
+
namespace Sword25 {
#define BS_LOG_PREFIX "MAIN"
@@ -140,6 +144,10 @@ bool Sword25Engine::appEnd() {
// The kernel is shutdown, and un-initialises all subsystems
Kernel::DeleteInstance();
+ AnimationTemplateRegistry::destroy();
+ RenderObjectRegistry::destroy();
+ RegionRegistry::destroy();
+
// Free the log file if it was used
BS_Log::_CloseLog();