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.
Questions about the ->drop() function
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.
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.