Re: [xml] Is this condition (xmlFreeNodeList) supposed to crash?



On Tue, Nov 30, 2004 at 06:53:33PM +0000, Jose Commins wrote:
      Function: xmlFreeNodeList
      void    xmlFreeNodeList                 (xmlNodePtr cur)

      Free a node and all its siblings, this is a recursive behaviour, all 
the children are freed too.

      cur:
      the first node in the list


      ...  to me its not clear what the precise difference between these 
      two are.

  The difference between freeing a list and freeing one item of a list 
should not need two pages of explanations.

Moreover, xmlFreeNodeList does not mention anything about 
xmlUnlinkNode.


      What's more, this is particularly puzzling:


      Function: xmlCleanupMemory
      void    xmlCleanupMemory                (void)

      Free up all the memory associated with memorys

  this function is mostly internal. I updated the header, you should not
call it directly.

      So does this mean it frees up all memory including new nodes created 
with xmlNewDocText

  No. It frees only the memory allocated by the library for its own use.
If you call this you should not use the library or have remaining documents
around.

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]