while(getchar()){ printf("Create\n"); QObject* obj1 = new QObject; QObject* obj2 = new QObject; QObject* obj3 = new QObject; QObject* obj4 = new QObject; printf("Delete\n"); delete obj1; delete obj2; delete obj3; delete obj4; }
C++ (Qt)void JustDoIt() { QObject* obj1 = new QObject; QObject* obj2 = new QObject; QObject* obj3 = new QTimer; QObject* obj4 = new QTimer; delete obj1; delete obj2; delete obj3; delete obj4; }
void JustDoIt() { QObject* obj1 = new QObject; QObject* obj2 = new QObject; QObject* obj3 = new QTimer; QObject* obj4 = new QTimer; delete obj1; delete obj2; delete obj3; delete obj4; }