Model item cleanup?
-
Caution! The model does not always delete the items!
If you use one of the takeXX methods, like "QStandardItemModel::takeItem() ":http://doc.qt.nokia.com/4.7/qstandarditemmodel.html#takeItem, the item is removed from the model, but it is not deleted! You get back a pointer (or a list of pointers) to the item(s) and you can reinsert the item in the same or another model or you must delete it manually to avoid a memory leak.