What is the rule of thumb for object deletion ?
It’s not very clear to me who is responsible for deleting what. For example, the Components returned by refreshComponentForRow or the ones added inside other Components.
Some things I figured out:
- I can delete a component that was added to another component and it is removed.
- I should call deleteAllChildren() if I want contained components to be deleted.
- What about components returned by refreshComponentForRow ? Should I call ListBox::deleteAllChildren() ?