in my application i need to create and destroy some objects depending by user interaction with the scene.
I’ve found out that every time i destroy and then re-create the object the heap memory increase: it seems that some resources are not released properly. So the question is, what’s the best practice to do that?
This is a PG similar to my applicaton: https://playground.babylonjs.com/#TESQZM#18
Click on the ground to toggle the creation/delete of the object (at least 10 times to see some significant change in memory)
What it seems to increase are some array object as you can se from these snapshots taken form Chrome DevTools:
Memory at start
Memory after some toggle job
Where do i mistake?