SCUMM: Make it clearer that SCUMM's 'restart' feature leaks like hell

This commit is contained in:
Max Horn 2011-05-13 14:33:22 +02:00
parent 65a82610d1
commit 4108f09543

View File

@ -2418,13 +2418,16 @@ void ScummEngine::pauseGame() {
}
void ScummEngine::restart() {
// TODO: Check this function - we should probably be reinitting a lot more stuff, and I suspect
// this leaks memory like a sieve
// FIXME: This function *leaks memory*, and quite a lot so. For example,
// we re-init the resource manager, which causes readMAXS() to be called
// again, which allocates some memory. There are many other leaks, though.
// Fingolfin seez: An alternate way to implement restarting would be to create
// a save state right after startup ... to this end we could introduce a SaveFile
// subclass which is implemented using a memory buffer (i.e. no actual file is
// created). Then to restart we just have to load that pseudo save state.
// TODO: We should also probably be reinitting a lot more stuff.
// Fingolfin seez: An alternate way to implement restarting would be to create
// a save state right after startup ... to this end we could introduce a SaveFile
// subclass which is implemented using a memory buffer (i.e. no actual file is
// created). Then to restart we just have to load that pseudo save state.
int i;