diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 9320fb4db2..157ad02c5f 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -86,8 +86,9 @@ Song::~Song() m_vpSteps.clear(); /* We deleted some Steps*; clear stuff that used it. */ - /* Don't make Song depend on SongManager. It's leading to some - * confusing limitation on what can be done in SONGMAN->FlushCaches(). */ + /* TODO: Don't make Song depend on SongManager. This is breaking + * encapsulation and placing confusing limitation on what can be done in + * SONGMAN->Invalidate(). -Chris */ SONGMAN->Invalidate( this ); } @@ -103,8 +104,11 @@ void Song::Reset() Song empty; *this = empty; - /* Courses cache Notes* pointers. On the off chance that this isn't the last + /* Courses cache Steps pointers. On the off chance that this isn't the last * thing this screen does, clear that cache. */ + /* TODO: Don't make Song depend on SongManager. This is breaking + * encapsulation and placing confusing limitation on what can be done in + * SONGMAN->Invalidate(). -Chris */ SONGMAN->Invalidate( this ); } diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 4055b1a196..71d8366d85 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -79,6 +79,8 @@ SongManager::SongManager() SongManager::~SongManager() { + // Courses depend on Songs and Songs don't depend on Courses. + // So, delete the Courses first. FreeCourses(); FreeSongs(); }