Re: [xml] Only through experimentation :o) XML and memory




Thanks - I wanted to make sure that was the precise operation. For users new to libxml it might be useful to read it thus (from the documentation):

From:

"Free up all the structures used by a document, tree included."

To:

"Free up the tree and all structures used by a document, including external nodes that are linked to the document."


If this addition seems more clear (opinions please!), should I include a report with an amendment?

Regards,
                Jose.


On 2 Dec 2004, at 11:02, Daniel Veillard wrote:

On Tue, Nov 30, 2004 at 08:36:22PM +0000, Jose Commins wrote:
allocated nodes.  I want to make sure my assumption is right, that
'xmlFreeDoc' will also deallocate/free any new nodes linked in to the
doc?

  xmlFreeDoc deallocate all nodes reachable from the document node !
It is what the doc says, it is what it does.
   http://xmlsoft.org/html/libxml-tree.html#xmlFreeDoc

if you linked a node to the doc it will be freed, if you didn't link it
it won't be freed.

Daniel

--
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]