diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-24 13:08:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-24 13:08:16 (GMT) |
commit | ab5dae35ca5d64cf08c2a48105af4f92dd53b27d (patch) | |
tree | 290138cc34bd828e083a218f2d28e3d9632a66bb /Lib/test | |
parent | 563d12d145dff15745780929149352d269bcb49f (diff) | |
download | cpython-ab5dae35ca5d64cf08c2a48105af4f92dd53b27d.zip cpython-ab5dae35ca5d64cf08c2a48105af4f92dd53b27d.tar.gz cpython-ab5dae35ca5d64cf08c2a48105af4f92dd53b27d.tar.bz2 |
Fix SF bug 572567: Memory leak in object comparison.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_descr.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index dca8ea1..ea67c4e 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1163,6 +1163,18 @@ def slots(): gc.collect() vereq(Counted.counter, 0) + # Test lookup leaks [SF bug 572567] + import sys,gc + class G(object): + def __cmp__(self, other): + return 0 + g = G() + orig_objects = len(gc.get_objects()) + for i in xrange(10): + g==g + new_objects = len(gc.get_objects()) + vereq(orig_objects, new_objects) + def dynamics(): if verbose: print "Testing class attribute propagation..." class D(object): |