You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2008/04/29 10:55:56 UTC
[jira] Resolved: (XERCESC-805) There should be a way to release
child nodes, once we done with it.(Patch Available)
[ https://issues.apache.org/jira/browse/XERCESC-805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alberto Massari resolved XERCESC-805.
-------------------------------------
Resolution: Duplicate
Assignee: (was: Xerces-C Developers Mailing List)
This functionality has already been implemented as part of XERCESC-837
> There should be a way to release child nodes, once we done with it.(Patch Available)
> ------------------------------------------------------------------------------------
>
> Key: XERCESC-805
> URL: https://issues.apache.org/jira/browse/XERCESC-805
> Project: Xerces-C++
> Issue Type: Bug
> Components: DOM
> Affects Versions: 2.1.0
> Environment: Operating System: MacOS X
> Platform: All
> Reporter: pranav
> Attachments: DOMNode.txt, DOMWriterImpl.txt
>
>
> We have classes derived from DOMNode. At any given point of time when we are
> having a DOMNode* , say nodePtr, with us we are not sure whether it points to
> a xerces node. We can't delete or release a xerces node unless its parent is
> released first.
> So for xerces the rule is that one has to release the document in the end and
> then only all the child nodes are released/deleted. So as soon as you are done
> with that node you must delete it.
> This cannot be done with xerces node.So the solution opted is that an empty
> function dispose() added to interface DOMNode which has an empty mplementation
> in xerces. Now whenever we use a DOMNode* and we are done with it we can call
> dispose over it. If node belongs to xerces nothing happens whereas if its
> ours, it gets deleted. That's the basic idea.
> Regarding the patch :
> DOMNode.hpp contains empty function dispose().
> DOMWriterImpl.cpp contains class DOMWriterImpl which implements the interface
> DOMWriter. So at places in DOMWriterImpl wherever we are done with DOMNode*,
> we call dispose over that. This is done so that when we use DOMWriter to act
> on DOM node, there are no memory leaks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org