Re: [xml] Support for Python
- From: Daniel Veillard <veillard redhat com>
- To: Matt Sergeant <matt sergeant org>
- Cc: Dave Kuhlman <dkuhlman cutter rexx com>, Gary Benson <gary inauspicious org>, "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Support for Python
- Date: Mon, 28 Jan 2002 15:13:44 -0500
On Mon, Jan 28, 2002 at 07:59:18PM +0000, Matt Sergeant wrote:
On Mon, 28 Jan 2002, Daniel Veillard wrote:
I don't think we can have garbage collectable xmlDoc, though nearly
every other classes exposed should be garbageable.
We do this with a proxy object in the Perl interface - the proxy simply
makes sure that the refcount doesn't get lost, and then DESTROY
(equivalent of __del__) does the xmlFree stuff. Works mostly quite well,
though it's a bit tricky to debug.
Does that mean that each time you export a new object (attribute,
element, etc...) from the interface you inc the ref and dec it each time
one of those is destroyed ?
The problem is to keep all this coherent in case of more complex operations
like cut an past or if the doc reference from those node disapear. Sounds
tricky to debug all case, I agree. Question, is it worth it ?
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/
] [Thread Prev