Correct way to freeentities/textures

BlitzMax Forums/MiniB3D Module/Correct way to freeentities/textures

KronosUK(Posted 2009) [#1]
Can someone please show me the correct way to free this entity and then recreate it. As you can see pressing I repeatedly increases the memory allocation which I assume is bad.

In my real world program I am creating a terrain mesh, terrain texture and then recreating it but I can't seem to clear the previous mesh.





Edit: Well ..putting the mesh into a type seems to work




Warner(Posted 2009) [#2]
Indeed, when not using the types, handles will be converted into integers.
Integer handles should be released with Release, or else it causes a memory leak.
It might be a good practice to use SuperStrict.


KronosUK(Posted 2009) [#3]
Thanks Warner. That explains the situation clearly.