Re: [xml] [Repost] Backwards compatibility and memory management...



On Tue, Mar 16, 2004 at 12:04:39PM -0500, Tristan Van Berkom wrote:
But I am still confused about xmlNodeListGetString(), the example
code (doc/example.html) hasn't changed and is quite unclear about
who is responsable for the returned memory location.

Am I correct to assume that "xmlNodeListGetString()" will always
allocate a new string in memory that can safely be freed with "free()" ?
(because this is what the example seems to assume, just seems strange to me)

  http://xmlsoft.org/html/libxml-tree.html#xmlNodeListGetString
  Returns:      a pointer to the string copy, the caller must free it with xmlFree().

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]