Re: Resource dispose in Qt4
There is no garbage collector
But there is parent-child relationship, objects are organized in hierarchies, and the parent will delete the child when gets out of scope (if created on stack) or manually deleted (if it was created on heap)
Re: Resource dispose in Qt4
Thank you Zlatomir,
So, in Qt4 I needn't use shared_ptr class from Boost library, is it?
Re: Resource dispose in Qt4
Qt has its own shared pointer, so you can use that.
And note that only the classes witch derive from QObject have the "parenting" thing, the other (even if their name starts with the letter 'Q') don't have that, so if you allocate on heap you must delete.
Re: Resource dispose in Qt4