[英]Is QStandardItemModel::removeRows() recursive?
在具有树结构的QStandardItemModel
上调用removeRows()
,是否递归为所有子级QStandartItem
释放了内存?
Is QStandardItemModel::removeRows() recursive?
QStandardItemModel :: removeRows()是否递归?
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?这是否递归地为所有子级
QStandartItem
释放了内存?
Yes, but this has little to do with removeRows()
. 是的,但这与
removeRows()
无关。 The ~QStandardItem()
destructor disposes of the children. ~QStandardItem()
析构函数处理子代。 So any method that destroys a QStandardItem
will also destroy and dispose of the children. 因此,任何破坏
QStandardItem
方法也将破坏并处置子项。 Nothing will leak. 什么都不会泄漏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.