FreeModuleDef() публичный статический Метод

public static FreeModuleDef ( IntPtr ptr ) : void
ptr System.IntPtr
Результат void
Пример #1
0
 internal static void ReleaseModuleDef()
 {
     if (module_def == IntPtr.Zero)
     {
         return;
     }
     ModuleDefOffset.FreeModuleDef(module_def);
     module_def = IntPtr.Zero;
 }
Пример #2
0
        //===================================================================
        // 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);
        }
Пример #3
0
        //===================================================================
        // 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);
            }
        }