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.
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.