Hello,
In my babylon project (togther with react
) I am using SceneLoader
to import a lot of gltf models.
For each model import, babylon generates a Dedicated worker:
The worker seems to be created by GLTFValidation
:
And these workers don’t dispose when I call scene.getEngine().dispose()
. I also disposed the loader specifically after model imported:
const loader = SceneLoader.ImportMesh(null, rootUrl, sceneFileName, scene, onSuccess, null, onError, importPlugin);
if (loader && loader.name === 'gltf') {
(loader as GLTFFileLoader).dispose();
}
This doesn’t remove the worker either.
I wonder if this is a bug that those workers should be disposed automatically right after model is imported. Right now if I don’t dispose them, they keep adding every time I visit the babylon scene from anther URL and result in a memory leak. Is there a way to dispose them manually together with engine.dispose()
?
Thanks in advance!
Chen