GCMemAlloced()
BlitzMax Forums/BlitzMax Beginners Area/GCMemAlloced()
| ||
just another question: try this code: ' >>>> Graphics 640, 480, 16 While Not KeyDown(key_escape) Cls DrawText "GC "+GCMemAlloced(), 10, 10 Flip Wend ' <<<< why the alloced memory is increased and decreasing? no object alloced! thanks! |
| ||
KeyDown,Cls,DrawText or Flip probably allocates some arrays/types in their code. |
| ||
but with previus versions of bmax (1.24 with no synch mods) this will not happens! thanks! |
| ||
Your "GC " + gcmemalloced() creates a string object? <edit> Hmmm... maybe not. It seems to be related to the mouse moving so could it be filling some buffer? |
| ||
Quite simply because the GC doesn't run every frame. Memory usage goes up to a certain point (which will vary depending on what you're doing and what objects you have), and then the GC kicks in and resets it. If you want the behaviour before GC was automatic, stick a GCCollect after the Flip and see the difference. |