From 7f9639fc012664ab0b8c02ac23b23a2cc6c1b6e1 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 24 Jul 2004 06:52:39 +0000 Subject: [PATCH] update comments --- stepmania/src/Song.cpp | 10 +++++++--- stepmania/src/SongManager.cpp | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) 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(); }