diff options
| author | Carl Meyer <carl@oddbird.net> | 2022-10-07 15:17:41 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-07 15:17:41 (GMT) |
| commit | be4099e55d30a2991b46add59ee96c531904c144 (patch) | |
| tree | 596ecd2924eac4565bfb2d2afe846c67d27f037d /Lib/test/test_capi.py | |
| parent | f99bb20cde258bfd8404448951f5454dc6279e98 (diff) | |
| download | cpython-be4099e55d30a2991b46add59ee96c531904c144.zip cpython-be4099e55d30a2991b46add59ee96c531904c144.tar.gz cpython-be4099e55d30a2991b46add59ee96c531904c144.tar.bz2 | |
Fix memory leaks in test_capi (#98017)
Diffstat (limited to 'Lib/test/test_capi.py')
| -rw-r--r-- | Lib/test/test_capi.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index cb90d55..19367df 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -1495,6 +1495,9 @@ class TestDictWatchers(unittest.TestCase): unraisable = unraisables[0] self.assertIs(unraisable.object, d) self.assertEqual(str(unraisable.exc_value), "boom!") + # avoid leaking reference cycles + del unraisable + del unraisables def test_two_watchers(self): d1 = {} |
