Deleting types
Blitz3D Forums/Blitz3D Programming/Deleting types
| ||
Hi again, I have the following type MyType field A.TypeA field B.TypeB end type global AnInstance MyType . . . When I want to delete the AnInstance variable do I have to delete manually the A and B or not? Function MyTypeDelete(v.MyType) delete v end function or Function MyTypeDelete(v.MyType) delete v\A delete v\B delete v end function thanks |
| ||
"Delete v" will not delete v\A. v\A is not inside v, it is just a pointer. The instance that v\A points to still exists in the TypeA list. It's like: if you do "v\A=Null" it won't delete v\A. |
| ||
Yip, use option 2. Stevie |
| ||
Thanks! |