Message 101961 - Python tracker (original) (raw)
By the way, Daniel, your patch doesn't look right. First, you shouldn't need all the sortedlist/sortedset hierarchy. Second, len(gc.get_objects()) is a truly horrible way of checking the classes have been destroyed. Just take a weakref to the class before deleting it, and check that calling the weakref returns None. (besides, we also have a refleak-detection run (regrtest -R) which can detect leaks even if you don't check them explicitly in your tests)