to delete an Object3D

Started by MichaelJPCT, October 28, 2018, 09:03:18 AM

Previous topic - Next topic

MichaelJPCT

Hi Egon, long time no see. i am still using JPCT for my hobby project , and i'm happy with it so far.
now i need to add/delete Object3D , like a lot. i see dispose() of Light , but no such thing of Object3D. does it mean it's safe to just remove it from World and set the field to null and let JVM do garbage collection?
and for other object types, are they all safe if there is no dispose() method?

EgonOlsen

Yes, it should be save to do that, but you have to make sure that each and every reference is gone, of course. It should then queue the GL buffers and dispose them eventually. Or you could disable vbo support in Config at all. In that case, there's nothing that has to be disposed GL wise in the first place. Performance might suffer a little though.