diff options
author | Max Horn | 2008-03-26 19:29:33 +0000 |
---|---|---|
committer | Max Horn | 2008-03-26 19:29:33 +0000 |
commit | b0c6a12c81c949c7f61b6639b509dad2b4fbb862 (patch) | |
tree | a20a4c62707dee6bad3a45fc2b3409d86c7377ce /common | |
parent | afed582280195bc0165e93af7003aadea6438c89 (diff) | |
download | scummvm-rg350-b0c6a12c81c949c7f61b6639b509dad2b4fbb862.tar.gz scummvm-rg350-b0c6a12c81c949c7f61b6639b509dad2b4fbb862.tar.bz2 scummvm-rg350-b0c6a12c81c949c7f61b6639b509dad2b4fbb862.zip |
Modified Patch #1925352: Memory leak fixes
svn-id: r31244
Diffstat (limited to 'common')
-rw-r--r-- | common/singleton.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/singleton.h b/common/singleton.h index 56039afb37..849bf208bb 100644 --- a/common/singleton.h +++ b/common/singleton.h @@ -71,6 +71,10 @@ public: _singleton = T::makeInstance(); return *_singleton; } + virtual void destroy() { + delete _singleton; + _singleton = 0; + } protected: Singleton<T>() { } #ifdef __SYMBIAN32__ |