Skip to content

Commit 2fc95b9

Browse files
committed
Remove exceptions saved in variables in dyld.py
As the exceptions were being saved in a different name it was generating a cycle since it was own through the `__traceback__`. By unsetting them we can collect the object earlier without the need of waiting for the gc.
1 parent 4fee725 commit 2fc95b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/ctypes/macholib/dyld.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ def framework_find(fn, executable_path=None, env=None):
149149
return dyld_find(fn, executable_path=executable_path, env=env)
150150
except ValueError:
151151
raise error
152+
finally:
153+
error = None
152154

153155
def test_dyld_find():
154156
env = {}

0 commit comments

Comments
 (0)