Re: Object recycling tips
Posted: Wed May 11, 2016 10:20 am
It is trivial for a particle emitter, since you can set any value to previously created one before with no problem, but i'm not sure about physics. Few examples - i found no way to change shape's dimensions or local points for it to be reused somewhere, and it also says that on every fixture created, shape is copied. So for now, it seems like, simple stack-structured pool would not work for physics.marco.lizza wrote: But one should also try and reuse the userdata types, more than the objects themselves.
So to recap this - default (strong) tables are collected only when there is no more references to them (and collection cycle happens), and weak tables can be collected on next collection cycle. Am i right?