diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2010-01-18 02:52:03 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-05 17:17:44 +0100 |
commit | 9d06ae80cfe008db84991cf69b430c8dc87a0fc1 (patch) | |
tree | 6ece6b6af3e72b3e0f59bbad936e3fc68ac5bb62 /src | |
parent | d317c56065bf6c386ccf66555594ecea10721597 (diff) | |
download | usdx-9d06ae80cfe008db84991cf69b430c8dc87a0fc1.tar.gz usdx-9d06ae80cfe008db84991cf69b430c8dc87a0fc1.tar.xz usdx-9d06ae80cfe008db84991cf69b430c8dc87a0fc1.zip |
removed more memory leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/base/lyric_line.cpp | 4 | ||||
-rw-r--r-- | src/base/song.cpp | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/base/lyric_line.cpp b/src/base/lyric_line.cpp index c15ddd58..e5e68fd2 100644 --- a/src/base/lyric_line.cpp +++ b/src/base/lyric_line.cpp @@ -34,6 +34,10 @@ namespace usdx LyricLine::~LyricLine() { + for (std::list<LyricWord*>::iterator it = words.begin(); it != words.end(); it++) { + delete *it; + } + words.clear(); } diff --git a/src/base/song.cpp b/src/base/song.cpp index ad5bb724..1b904810 100644 --- a/src/base/song.cpp +++ b/src/base/song.cpp @@ -90,7 +90,15 @@ namespace usdx Song::~Song(void) { + for (std::list<BPM*>::iterator it = bpm.begin(); it != bpm.end(); it++) { + delete *it; + } + bpm.clear(); + + for (std::list<LyricLine*>::iterator it = lyrics.begin(); it != lyrics.end(); it++) { + delete *it; + } lyrics.clear(); } |