Apache OpenOffice (AOO) Bugzilla – Issue 112783
unoxml: ownership cycles in unoxml
Last modified: 2017-05-20 10:22:24 UTC
In unoxml when a uno xml element is created, e.g. xDoc->getDocumentElement() in desktop/source/deployment/registry/package/dp_description.cxx Each such UNO xml node is implemented with a CNode every CNode takes a uno::Reference to its owner document for the nodes lifecycle i.e. m_rDocument = getOwnerDocument() in unoxml/source/dom/node.cxx but each CNode also calls "addnode" on its owner to add a uno::Reference to that node from the ownerdocument for its lifecycle Each node holds a reference to the ownerdocument, and the ownerdocument holds a reference to each node which means that the whole cycle doesn't get released. In this case I think it should be sufficient for each child node to hold a reference to the parent document.
Created attachment 70288 [details] like so
Michael, please have a look
*** Issue 113601 has been marked as a duplicate of this issue. ***
thanks for getting rid of this nonsense, i've committed the patch. fixed in cws sw34bf01 http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/7a0c765bdb60 http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/d2ae78ad0a64
please verify
verified