[ http://nagoya.apache.org/jira/browse/XERCESC-805?page=history ]
Alberto Massari updated XERCESC-805: ------------------------------------ Priority: Major > There should be a way to release child nodes, once we done with it.(Patch Available) > ------------------------------------------------------------------------------------ > > Key: XERCESC-805 > URL: http://nagoya.apache.org/jira/browse/XERCESC-805 > Project: Xerces-C++ > Type: Bug > Components: DOM > Versions: 2.1.0 > Environment: Operating System: MacOS X > Platform: All > Reporter: pranav > Assignee: Xerces-C Developers Mailing List > 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. - If you think it was sent incorrectly contact one of the administrators: http://nagoya.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]