// program using 9.272 K
scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp");
// program using 17.884 K
delete q3levelmesh;
q3levelmesh = 0;
// program using 14.960 K
A handle to the mesh will still be in the mesh cache, so you need to remove it from there. Once you've removed it from the cache, and you drop your handle to the mesh, the memory usage should almost go back to the original state.
You only want to drop a handle if you have grabbed it. If you are removing meshes from the cache, then you should be grabbing them.
Travis
Last edited by vitek on Mon Oct 01, 2007 3:07 am, edited 1 time in total.
You should never call a delete on a pointer pointing to a mesh or a scenenode handled by irrlicht. Always call a ->drop(); See IUnknown for details.
I have looked at IUnknown. The comment said one sould only call drop() if the pointer was initialised via a createSomething().... method...
A handle to the mesh will still be in the mesh cache, so you need to remove it from there. Once you've removed it from the cache, and you drop your handle to the mesh, the memory usage should almost go back to the original state.