We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c0afe6 commit 958dd30Copy full SHA for 958dd30
src/runtime/Runtime.cs
@@ -170,7 +170,7 @@ internal static void Initialize(bool initSigs = false)
170
}
171
else
172
{
173
- PyCLRMetaType = MetaType.Initialize();
+ PyCLRMetaType = PyCLRMetaType ?? MetaType.Initialize();
174
ImportHook.Initialize();
175
176
Exceptions.Initialize();
@@ -288,9 +288,12 @@ internal static void Shutdown()
288
TypeManager.RemoveTypes();
289
_typesInitialized = false;
290
291
- MetaType.Release();
292
- PyCLRMetaType.Dispose();
293
- PyCLRMetaType = null!;
+ if (RuntimeData.HasStashData())
+ {
+ MetaType.Release();
294
+ PyCLRMetaType.Dispose();
295
+ PyCLRMetaType = null!;
296
+ }
297
298
Exceptions.Shutdown();
299
PythonEngine.InteropConfiguration.Dispose();
0 commit comments