diff options
author | Max Horn | 2011-05-13 14:33:22 +0200 |
---|---|---|
committer | Max Horn | 2011-05-13 14:33:22 +0200 |
commit | 4108f09543afd543fbfab86cc5f3e7f4850150a2 (patch) | |
tree | fa6c8972db9a764d061353fdf72182ce8b6c9667 | |
parent | 65a82610d15214eee56d0719c0f80c1e86b3039a (diff) | |
download | scummvm-rg350-4108f09543afd543fbfab86cc5f3e7f4850150a2.tar.gz scummvm-rg350-4108f09543afd543fbfab86cc5f3e7f4850150a2.tar.bz2 scummvm-rg350-4108f09543afd543fbfab86cc5f3e7f4850150a2.zip |
SCUMM: Make it clearer that SCUMM's 'restart' feature leaks like hell
-rw-r--r-- | engines/scumm/scumm.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index f0b646157a..3ebacee6a5 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -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; |