Getting rid of IOSOperator

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
ortsa
Posts: 11
Joined: Sun Jul 27, 2008 4:14 pm

Getting rid of IOSOperator

Post by ortsa »

Hey just a quick question here
When i get a IOSOperator class using my irrlicht device am i right in assuming that when the device is dropped it also drops the IOSOperator it owns which is the one im getting a pointer to?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Yes. If you want to prevent the object from being deleted, you should call grab() when you get the pointer from the device, and then call drop() when you are done with it.

This is no different from how all other IReferenceCounted derived objects behave in the Irrlicht system.

Travis
Post Reply