I'm finding that I am getting a memory leak with the FreeGadget command. Even a simple test program such as this will see the ram usage spiral at a steady and uncomfortable rate.
Am I doing something wrong? When I delete a gadget I wish to utterly destroy it, I think BlitzMax is keeping it in memory incase it is re-used but when I reuse the same gadget a new instance is made anyway, or something.
I've tried doing GCCollect manually, but it doesnt make a difference.
I'm compiling using Intel Mac OS X version of Blitz Max.
Thank you.
Global hello:TGadget Global window:TGadget window=CreateWindow("World",0,0,200,200) Repeat createanddelete() Until KeyDown(KEY_ESCAPE) Function createanddelete() hello=CreateButton("hello",0,0,100,100,window) FreeGadget hello End Function
Am I doing something wrong? When I delete a gadget I wish to utterly destroy it, I think BlitzMax is keeping it in memory incase it is re-used but when I reuse the same gadget a new instance is made anyway, or something.
I've tried doing GCCollect manually, but it doesnt make a difference.
I'm compiling using Intel Mac OS X version of Blitz Max.
Thank you.