When calling removeRows()
on QStandardItemModel
with tree structure does this free the memory for all the children QStandartItem
s recursively?
Is QStandardItemModel::removeRows() recursive?
No. It can't be since a model isn't a tree of models.
does this free the memory for all the children
QStandartItem
s recursively?
Yes, but this has little to do with removeRows()
. The ~QStandardItem()
destructor disposes of the children. So any method that destroys a QStandardItem
will also destroy and dispose of the children. Nothing will leak.