It's exactly the other way round as explained by the Qt support via email, received today.
But I will answer them tomorrow because this is not true.When you call removeChild() then all it is going to do is remove it from the current tree, you still get a reference to the QDomNode that you have removed which is why it still exists in memory because it hasn't been actually deleted. If you want to ensure that the contents of the node are also deleted then you need to call clear() on that node. This will cause it to be deleted and point to a null node and therefore the memory should be freed up for you. See:
http://qt-project.org/doc/qt-4.8/qdomnode.html#clear
If I only call clear(), nothing is deleted. The call to clear() seems to have no consequences.
Or, probably, for clear() it's as you said about removeChild(), call it recursively.
Bookmarks