Commit 5bcc847
committed
Use atexit for cleanup of Python-extended prototypes
Use standard atexit handler to remove Python-extended prototype
objects from C++ registry. Ensure cleanup is truly executed
instead of relying on garbage collector to call `__del__`.
This prevents the following error message on Python exit
Fatal Python error: PyThreadState_Get: the function must be called
with the GIL held, but the GIL is released (the current Python
thread state is NULL)1 parent a0b9f7f commit 5bcc847
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
0 commit comments