destroy a type

Blitz3D Forums/Blitz3D Programming/destroy a type

Rook Zimbabwe(Posted 2005) [#1]
If I have created a group of objects and set them in a type but find I need to destroy all instances in this type so I can either recreate it later with different objects or just junk it to free up a little memory... How?

{{EDIT}} Found it... but there must be a better way than this:
For Button.button_type = Each button_type
	Delete Button
Next

:)
RZ


Snarkbait(Posted 2005) [#2]
Delete Each Button



big10p(Posted 2005) [#3]
It came to light in a recent thread that deleting types doesn't actually return the memory back to the heap, but simply flags the type as 'deleted and reusable'. Therefore, deleting types to free up memory doesn't actually buy you anything. :)


Rook Zimbabwe(Posted 2005) [#4]
Hmmph.. OK but I still had to clean the screen up. I am using a button image code and it sets the buttons as types. I use a couple of different buttons depending on which screen you are on and if I didn't delete the types the older buttons would appear on the new screen.

RZ


big10p(Posted 2005) [#5]
Yeah, that's fine and dandy. :) I was just warning you that deleting types won't actually free up any mem.