cache Course::GetCourseInfo results

This commit is contained in:
Glenn Maynard
2003-12-21 02:54:23 +00:00
parent be307e76bd
commit ef6b831ea3
6 changed files with 60 additions and 11 deletions
+4 -3
View File
@@ -477,6 +477,10 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
* screens turn this off in their ctor if they handle timers themselves (gameplay, edit). */
SOUND->HandleSongTimer( true );
/* Cleanup song data. This can free up a fair bit of memory, so do it before
* creating the new screen, to lower peak memory usage slightly. */
SONGMAN->Cleanup();
Screen *ret = Screen::Create( sClassName );
/* Loading probably took a little while. Let's reset stats. This prevents us
@@ -485,9 +489,6 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
* apparent. */
DISPLAY->ResetStats();
/* This is a convenient time to clean up our song cache. */
SONGMAN->CompressSongs();
return ret;
}