Assetcontainer and what to put inside


When I use

 let q = await SceneLoader.ImportMeshAsync("","path","object", scene)

I get q with multiple meshes and geometries inside.

To make sure everything is cleanly disposed when erasing the Assetcontainer, should I put the q.meshes and q.geometries in the Assetcontainer or just the q.meshes ?
I want to recycle memory as fast as possible.


There’s no asset container involved when you use ImportMeshAsync.

What you have in q is simply pointers to the objects that have been created during loading and that have already been added to the scene.

So, basically, you don’t have anything to do. If you want to help the garbage collector a bit, you can set q = null to indicate you don’t need to access q anymore.

Ok Interesting, thanks Evgeni