Closed jinincarnate closed 1 year ago
do you know the imperative solution? if you can make a regular babylon PG then I'm sure we can figure it out.
Hi i have tried adding babylonjs inspector to your example so that the issue can be seen easily. the code might run a lil slow just tried to cook up something fast.
Try it on https://codesandbox.io/s/relaxed-solomon-75zjci
as u can see in the image multiple instances of advanced dynamic texture material are getting created as we open and close the 3d UI
thanks @jinincarnate - I found the memory leak. the sandbox was a great repo.
@jinincarnate can you confirm it's fixed in 3.1.17
?
looks like solved
Hi I have created a 3d UI in VR using a similar code as shown in the link below
https://brianzinn.github.io/react-babylonjs/examples/gui/2d-gui
but when the component is unmounted all objects like plane, advancedDynamicTexture, and all other ui components gets destroyed, but advancedDynamicTextureMaterial (that gets created automatically) doesn't get disposed and keeps hanging in the scene. Is there a way to get its reference so that it can be disposed.