Hey,
For the past few days, i've been searching my butt off on how to actually remove meshes from the scenemanager and or the memory.
Everytime i try "getSceneNodeFrom[Id/Name/etc.](...)->remove[ /All]();
the application freezes.
If i just test "sydney->remove[ /All](); or smgr->remove[ /All](sydney); it also just freezes.
I decided to come ask for help, I would appreciate it alot!
Thanks!!
Removing Meshes from scene and/or memory [Help needed badly!
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Try to use smgr->addToDeletionQueue(ISceneNode* node), this will let the scene manager remove a node as soon as it's safe to remove it
http://irrlicht.sourceforge.net/docu/cl ... 8d7bf31f5a
http://irrlicht.sourceforge.net/docu/cl ... 8d7bf31f5a
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
I can't answer this for sure, it's been a while since I've had to do actual heavy memory management in irrlicht
I do know however that there is an issue with removing textures from memory, I believe it's something to do with the fact that it isn't that easy to check whether they are still being referenced by an object or not
I do know however that there is an issue with removing textures from memory, I believe it's something to do with the fact that it isn't that easy to check whether they are still being referenced by an object or not
It shouldn't be removed since other nodes might be using it at that moment, so you should clean them from IVideoDriver class. But you also shouldn't remove the texture everytime you remove node thats using it, unless its important in what you plan.
Working on game: Marrbles (Currently stopped).