Deleting Objects?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
TunaBreeze
Posts: 8
Joined: Fri Apr 27, 2007 1:20 am

Deleting Objects?

Post by TunaBreeze »

Okay, I noticed in all the examples you create something with your device (example - a GUI object). If I want to discontinue using said GUI object do I just delete the pointer to the object or is there something I need to do instead.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

It really depends on what exactly you are talking about. If you have a pointer to an IGUIElement derived type, you would call remove() on it. Same for ISceneNode derived types. Depending on how you got the object pointer, you might need to call drop() on that pointer when you're done with it.

I don't believe that there is any method in Irrlicht that gives you a pointer to something that you should be calling delete on.

Travis
Post Reply