Potential memory leak with `managedMaterialPlugins`

While profiling my Babylon 7.x project, I noticed that the number of WebXRDepthSensingMaterialPlugin instances keeps increasing whenever I create a scene, clone a few meshes, then dispose it:

A brief look at the reference chain & source code suggests the plugin instances keep being added to managedMaterialPlugins without getting cleaned up, holding the references to materials contained in them.

1 Like

cc @RaananW

Thank for reporting, will deal with it shortly

4 Likes
1 Like

Thanks much for the quick fix! :slightly_smiling_face:

1 Like