Cleanmem

A Quote From "rinkuhero":

there are a few things to keep in mind which still make this dll useful

-first, gm has things stored in memory which are never used by the game when it's running: functions which are never called, images which are in the game but never used (such as all the memory that goes into creating image files for the fonts, some of the more obscure characters are never used).

-second, not everything is used at once; some levels don't use graphics from other levels, some levels don't use music or sounds in other levels

-third, the way gm stores images in memory is somewhat stupid: it stores them twice, and only one of those two memory locations is ever accessed by the running game. a friend of mine discovered this in tests of his, and was completely shocked (as was i when he told me about it) at how stupidly inefficient gm's memory management is.

therefore, if you run this dll once every level (or every other significant change in what memory is needed) you will be freeing the memory not immediately used by the game. this can be useful in games which use a lot of resources but where only a few of those many resources are used at a time. i wouldn't recommend the dll be used any more often than that, because all it would do is unload and then immediately re-load everything it's using at that time. even just using it once at the start of the game has benefits, because anything that the game doesn't need to use to run won't be in ram (and there are parts of the gm runner's memory which don't need to be used by any game, such as the double locations for image files).

so the bottom line is: the dll may be useless or even slow your game if used too often, but if used *between levels* or *just once, at the start of the game* it may be beneficial because it'd put the stuff that doesn't need to be in memory at all (because the game doesn't use it) into the page file.

if gm's memory management were actually done competently, then of course a dll like this would be useless. but it isn't, it's terrible and inefficient, and there are huge blocks of completely useless memory that gm creates. since that is the case, this dll has its uses. it shouldn't require12 MB of RAM just to run a blank, empty room with nothing in it (i made new gm game file with nothing in it and added an empty room to test this). yet that's what gm does.