internal static void ReleaseModuleDef() { if (module_def == IntPtr.Zero) { return; } ModuleDefOffset.FreeModuleDef(module_def); module_def = IntPtr.Zero; }
//=================================================================== // Cleanup resources upon shutdown of the Python runtime. //=================================================================== internal static void Shutdown() { #if (PYTHON32 || PYTHON33 || PYTHON34) Runtime.Decref(py_clr_module); Runtime.Decref(root.pyHandle); ModuleDefOffset.FreeModuleDef(module_def); #else Runtime.Decref(root.pyHandle); Runtime.Decref(root.pyHandle); #endif Runtime.Decref(py_import); }
//=================================================================== // Cleanup resources upon shutdown of the Python runtime. //=================================================================== internal static void Shutdown() { #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) if (0 != Runtime.Py_IsInitialized()) { Runtime.Decref(py_clr_module); Runtime.Decref(root.pyHandle); } ModuleDefOffset.FreeModuleDef(module_def); #else if (0 != Runtime.Py_IsInitialized()) { Runtime.Decref(root.pyHandle); Runtime.Decref(root.pyHandle); } #endif if (0 != Runtime.Py_IsInitialized()) { Runtime.Decref(py_import); } }