Hi,
it is not clear to me howto dispose Box3, I am cloning box containing content size to padd it to have margins in a new view.
I don t find dispose, to avoid creating many Box3 clones
Hi,
it is not clear to me howto dispose Box3, I am cloning box containing content size to padd it to have margins in a new view.
I don t find dispose, to avoid creating many Box3 clones
The .dispose() method generally exists only for objects with resources that cannot be garbage collected by JavaScript, like GPU resources. Box3 has no such resources and doesn’t need to be explicitly disposed, you can just remove references to it (as with any JS object).
That said, if you’re creating many hundreds or thousands of Box3 clones, it might be better to reuse them.