View Single Post
Posts: 124 | Thanked: 10 times | Joined on Jan 2007 @ Italy
#15
Originally Posted by gri View Post
Not sure what you mean.

example implementation code:
Code:
MyClass::MyClass(QObject* parent)
: QObject(parent) // Not passing the parent to the QObject base will also result in memory leakage
{
    mySubObject = new QObject(this); // Will be deleted when "MyClass" dies
    myLeakObject = new QObject; // Will live forever
}
yes, that's what i meant!! really thanks