When does TreeViewItem::removeSubItem actually delete its sub?


#1

Could it be that when calling removeSubItem() the sub item isn't actually immediately destructed? I'm depending on the destructor of the sub item for some things to happen, but it doesn't seem to get called at the right moment.


#2

It will definitely be deleted immediately.


#3

Ah, then the problem seems to be with the component that is returned from createItemComponent(). I guess the tree manages those, then?


#4

Like it says in the comments, yes.