can't be freed with GC Collect. It seems to be the same basic amount (536 bytes) no matter how many images you load or if you load sounds AND images.
See this code:
If you load nothing, start and end are the same. If you load something (or everything) doesn't matter what, the end value is higher than the start value. Must be some BMax filehandling code that creates some globals that aren't freed up.
Worth bearing in mind if you are writing apps to test
freeing memory (like I am).
***BIG FAT EDIT***
Only occurs in Debug mode.
See this code:
DisplayMem("Start") test() DisplayMem("End") Function Test() 'try commenting these out Local i:TImage = LoadImage("logo.png") Local j:TImage = LoadImage("logo.png") Local s:TSound = LoadSound("testsound.wav") End Function Function DisplayMem(label$="") GCCollect() Print GCMemAlloced() + " " + label End Function
If you load nothing, start and end are the same. If you load something (or everything) doesn't matter what, the end value is higher than the start value. Must be some BMax filehandling code that creates some globals that aren't freed up.
Worth bearing in mind if you are writing apps to test
freeing memory (like I am).
***BIG FAT EDIT***
Only occurs in Debug mode.