Questions about the ->drop() function

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
cdesseno
Posts: 10
Joined: Sun Dec 14, 2008 8:03 pm
Location: Buenos Aires, Argentina
Contact:

Questions about the ->drop() function

Post by cdesseno »

I'm not sure to what objects I can apply de drop() function. Foe e.g if I have an int functions and I return a value, all the items are dropped themselves?

Thanks in advance.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

You could read the doc entry about drop(). All things you get from a function starting with create (e.g. createDevice) have to be dropped. Things from functions starting with get/add/ or whatever only need to be dropped if you manually grabbed them.

However this does only apply to classes that derive from IReferenceCounted. So int, char or whatever don't need to be and can't be dropped.

If you have a class that you wrote yourself that does derive from IReferenceCounted you can call drop and grab on it. But you can also use normal new and delete operators.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Post Reply