You can’t. The browser is free to release the memory whenever it wants. It shouldn’t normally be a problem, the browser will reclaim some memory if it needs to.
i find another problem here. when i use importmeshasync and dispose in high frequency, if the browser not cleanup the used memory in time, oom in a short time
Normally it should just work as the browser should release memory if it needs to. Maybe not everything is disposed on your side and the browser can’t reclaim the memory?
actually in my situation, I only need to release the mesh memory, the material and texture need be kept. And I use .dispose( true, false).
It this the correct usage?
Yes, that seems ok to me. However, if you are cloning meshes, the geometry will be shared by all the cloned meshes, so it won’t be released until all meshes using this geometry are disposed.
Oh the mesh i used has instances, for example, the mesh includes 10 trees( one is the root and the others are instances). If I only call .dispose for the root tree, all trees will not be released?