Re: [xml] stylesheet imports and memory management



"James Dennett" <jdennett technocom-wireless com> writes:

(Sent to list, CC'd for convenience)

I've been planning (sorry...) to submit a patch to the libxml2
documentation to note that the call xsltParseStylesheetDoc takes
ownership of the document that is passed to it (i.e., guarantees to
release it appropriately), so that code using this function must not
free the document.  Indeed, the document may be modified as a result of
passing it to xsltParseStylesheetDoc.

Cool. A patch to the doc looks like a good idea then.


I'm guessing it's quite possible that the Python wrapper calls this
function 

I wrote it and yes it does.


and therefore has the same problems as our in-house C++
wrappers did before I changed them to relinquish ownership when calling
xsltParseStylesheetDoc.

Personally, I don't object to the behaviour of libxslt. I was just
confused because I knew I'd read that it *didn't* do that.

-- 
Nic Ferrier
http://www.tapsellferrier.co.uk   for all your tapsell ferrier needs



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