Delete entity before type?

Blitz3D Forums/Blitz3D Programming/Delete entity before type?

JBR(Posted 2004) [#1]
Hello, probably asked a lot of times but if I have an entity in a field in a type and I want to 'free' the entity and the type instance should I 'free' the entity and then delete the type or will deleting the type instance do the job?

Also, can I use a standard blitz array in a type field?

Thanks
Marg


jhocking(Posted 2004) [#2]
Deleting the type instance will not free the entity. What you're storing in the type is the handle to the entity, not the entity itself (ie. the field is just an integer whose number is the memory address of the entity.)

Yes, you can use an array in a type.


Ross C(Posted 2004) [#3]
How do you mean by a standard blitz array?

If you mean dim array(10,2), then you can't use them. It's only Blitz arrays that you can use, which are different from normal arrays in blitz.

Blitz arrays can only be one dimentional. And are dimmed using [] square brackets :)

Sorry if you knew this, but thought i'd point it out anyway, to save confusion.