Deleteing objects

BlitzMax Forums/BlitzMax Beginners Area/Deleteing objects

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Removing links in a list (ie a lost type floating randomly around in memory) is the way to release it. If you have any integer variables pointing to something, simply set it to NULL. Or 0 might do.

Then, calling Flushmem (usually one call in your main game loop, doesn't matter where, your MAIN game loop though, not in any functions or whatever) is all you need. The garbage collector will decide when is the best time to unallocate your data.