Noob Bmax GC and Entity

Blitz3D SDK Forums/Blitz3D SDK Programming/Noob Bmax GC and Entity

I think Blitz3dSDK is not a managed library so you have to free all entities. I would recomend you to manage them using a class.
something like
Type Tentity
    Field entity:Int
    Method Delete()
        if entity<> 0 then 
            bbFreeEntity entity
            entity = 0
    end Method
End Type


and store all entities on instances of this class, so when then class is Collected, the entitie is free. You can call the delete method 'by hand' if you want to free an antity before the gc collector calls the delete method of the class.