leftBox->addLayout(protoItem2);
leftBox->removeItem(protoItem2);
protoItem2=0;
delete protoItem2; // <--- same as "delete 0;"
leftBox->addLayout(protoItem2);
leftBox->removeItem(protoItem2);
protoItem2=0;
delete protoItem2; // <--- same as "delete 0;"
To copy to clipboard, switch view to plain text mode
leftBox->addLayout(protoItem2);
leftBox->removeItem(protoItem2);
delete protoItem2; // delete first
protoItem2=0; // then set the pointer to 0
leftBox->addLayout(protoItem2);
leftBox->removeItem(protoItem2);
delete protoItem2; // delete first
protoItem2=0; // then set the pointer to 0
To copy to clipboard, switch view to plain text mode
Bookmarks