diff options
-rw-r--r-- | src/base/songloading/songloader.cpp | 6 | ||||
-rw-r--r-- | test/base/songloading.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/base/songloading/songloader.cpp b/src/base/songloading/songloader.cpp index 1b900bd4..0b1e34ad 100644 --- a/src/base/songloading/songloader.cpp +++ b/src/base/songloading/songloader.cpp @@ -44,6 +44,12 @@ namespace usdx Songloader::~Songloader(void) { + std::map<std::string, SongloadingStrategy*>::iterator it; + for (it = strategies.begin(); it != strategies.end(); it++) { + delete it->second; + it->second = NULL; + } + strategies.clear(); } diff --git a/test/base/songloading.cpp b/test/base/songloading.cpp index 3119d0c4..72930f0a 100644 --- a/test/base/songloading.cpp +++ b/test/base/songloading.cpp @@ -69,6 +69,9 @@ namespace usdx //CPPUNIT_ASSERT( 0 == song->get_notesgap() ); // TODO encodeing class //CPPUNIT_ASSERT( UTF-8 == song->get_encodeing() ); + + delete song; + delete Songloader::get_instance(); } }; |