there are many shared resoures in my scene. different geometries may use the same index buffer, uv buffers. different meshes may use the same geometry with different transfom, and there are also many shared materials.
the problem is: when i remove a mesh, i can not know whether its shared resource are being used by other meshes. so i can't find a place to dispose the resource with out reference counting.
will there be a reference counting method built in three.js in the future ? and the resources can be dispossed automatically.
how do deal with my situation in a elegant way now ?
thank you !
@yaoyao-cn The disposal of resources is done on app-level right now. I don't think three.js will do this automatically for you. Even if a resource has no references anymore, the library don't know if the app needs it at a later point.
@Mugen87
thank you !
Most helpful comment
@yaoyao-cn The disposal of resources is done on app-level right now. I don't think
three.jswill do this automatically for you. Even if a resource has no references anymore, the library don't know if the app needs it at a later point.