[XML-SIG] Re: [Python-Dev] test_minidom non-failure failure? (take 2)

Neil Schemenauer nas@arctrix.com
Thu, 12 Oct 2000 03:24:48 -0700

On Thu, Oct 12, 2000 at 12:39:40PM -0500, Guido van Rossum wrote:
> Of course something is producing cyclic garbage!
> The DOM tree is full of parent and child links.
> Does this output mean that the GC works correctly?  Or does it
> mean that there is a reason why this garbage cannot be disposed
> of?  In the latter case, could that be because there are
> __del__ methods?

The -l option tries to find any cyclic garbage produced by the
tests.  I don't think that that option should be enabled default.
The output means that the GC is working and is finding stuff that
would not be freed by reference counting alone.  

I can't tell if the GC would free this garbage.  The -l option
sets the DEBUG_SAVEALL option which causes all garbage found to
end up in gc.garbage, not just garbage the can't be cleaned up.

I don't have pyexpat installed here so I can't test it.  If you
want to find out if test_minidom is creating garbage the
collector can't free you should comment out the:


line in regrtest.py and run:

    regrtest.py -l test_minidom

If that does what I think it does and you still get the "garbage: "
line then the test is creating evil things.  :)