mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
SCUMM: Make it clearer that SCUMM's 'restart' feature leaks like hell
This commit is contained in:
parent
65a82610d1
commit
4108f09543
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user