So in my game I'm trying to clear out chunks of memory between frames. I've just added a little bit that jumps to an intermediate frame between level frames. Just running the blank frame uses up 7mb ram (because it's got global events maybe?), but if you run the game then it uses up 13mb. Is it possible to clear that 5mb. Hoping to find a fix for that graphic/memory bug that replaces graphics, tried every other solution with no luck .
7Mb does seem a lot for a simple frame, but most people have quite a bit more than 13Mb free memory so I wouldn't worry about it.
It would be interesting to know if the memory is taken up by the Global Events. Perhaps Clickteam could add a little toggle in the next MMF update that would allow us to disable Global Events in some frames.
I think you're looking for "garbage collection." I think LUA and .NET have this functionality, so get to learning either of those and use those extensions! It'd be better if there were a GC extension, too.
A entirely blank frame uses 6MB. No events, no objects, nada.
Ah yes, a blank 640x480 frame with no events/objects is 6mb. I guess that 1mb is from the global events after all. Ah well. And yes I do have a lot of global objects.
I've tried running a loop to create 25mb (what the running game peaks at) worth of actives too, in the hope that it 'overwrites' or whatever the previous graphics and loads them up again but it takes much too long.
I think I have a solution: "Load on Call" under the runtime options. From the help file:
This option saves memory, and accelerates loading time of big frames. If unchecked (default option), all the object's data are loaded at the beginning of the frame. For big objects on CD-ROM this can create a small delay when the frame appears.
If checked, and if the object is not created at the beginning of the frame, the object's data are not loaded at the beginning of the frame. They are only loaded when you create the object in the frame.
This might be useful if a lot of your global objects are particles and stuff.