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)
  Returns:      a pointer to the string copy, the caller must free it with xmlFree().


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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