8000 attempt to fix crash on shutdown of Python executable · pythonnet/pythonnet@5113257 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5113257

Browse files
committed
attempt to fix crash on shutdown of Python executable
1 parent 9010aa4 commit 5113257

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/metatype.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public static PyType Initialize()
3737

3838
public static void Release()
3939
{
40+
if (Runtime.HostedInPython)
41+
{
42+
_metaSlotsHodler.ResetSlots();
43+
}
4044
PyCLRMetaType.Dispose();
4145
}
4246

0 commit comments

Comments
 (0)
0