Skip to content

Commit 9ef54ce

Browse files
Ensure that gc.collect is called before checking refcounts.
As title.
1 parent 1c5970d commit 9ef54ce

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎numba/tests/support.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def assertRefCount(self, *objects):
255255
"""
256256
old_refcounts = [sys.getrefcount(x) for x in objects]
257257
yield
258+
gc.collect()
258259
new_refcounts = [sys.getrefcount(x) for x in objects]
259260
for old, new, obj in zip(old_refcounts, new_refcounts, objects):
260261
if old != new:

0 commit comments

Comments
 (0)