Re: [xslt] xmlFree vs free



On Thu, Mar 06, 2003 at 12:51:06PM -0800, Jerome Pesenti wrote:
> Is it safe to use "free" instead of "xmlFree"?

  in general no, the malloc routines may have been redefined
and this may lead to a crash. I think this may also give troubles on
Windows, in general it makes the code less portable. This may work
in most case but I remember it was giving troubles on some
Windows setups for example.

> The particular case I am interested in is html_str
> after calling:
> 
> xsltSaveResultToString(&html_str, &size, html_doc,
> sheet).

  Better to use xmlFree() in general,

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]