[XML-SIG] Re: XML-SIG digest, Vol 1 #121 - 1 msg

Jeff.Johnson@stn.siemens.com Jeff.Johnson@stn.siemens.com
Sun, 11 Oct 1998 21:12:28 -0400

> I don't know much about the various XML parsers but I think I have found
> circular reference in at least one.  When I call the following code...
>      p = saxexts.make_parser()
>      p = None
> ..the object pointed to by 'p' does not get freed.

>From: "Andrew M. Kuchling" <akuchlin@cnri.reston.va.us>
>>I've checked in a fix for this; p.parser had some
>>references to some methods of p.  I added code to the parser's .close()
method which deleted those
>>attributes, so everything's fine as long as you're
>>sure to call p.close() when you've finished
>>parsing.  We'll document that as being required.

Thanks for finding that so fast, I'm so anal retentive I probably would've
spent next week trying to find it :)

>> The DOM tree doesn't get freed because the parser points to the builder
>> "doc_handler", the builder points to the document and to the
>> current_element which also points to the document.

>I can't seem to reproduce this.  Note that what you describe isn't really
a cycle; it looks like
>parser -> builder  -> currentelement -> document
>          builder  ->                   document

Yeah, I meant the cycle was in the parser and because it didn't free, the
DOM didn't free.  Now that the parser will free, problem solved :)

Thanks again,