class MyWidget : public QWidget{public:MyWidget() : QWidget( 0, "MyWidget" ) { data = new char[128*1024*1024]; } ~MyWidget() { qDebug( "In MyWidget::~MyWidget" ); delete[] data; }private: char* data; };........... MyWidget* mw = new MyWidget; QWidget* w = mw; delete w;
class Q_EXPORT QObject: public Qt{ Q_OBJECT Q_PROPERTY( QCString name READ name WRITE setName )public: QObject( QObject *parent=0, const char *name=0 ); virtual ~QObject();