Ejemplo n.º 1
0
        private static void Cleanup()
        {
            try {
                if (_global != (IntPtr)0)
                {
                    _global = (IntPtr)0;
                }

                if (_instance != (IntPtr)0)
                {
                    UnsafeNativeMethods.PerfCloseAppCounters(_instance);
                    _instance = (IntPtr)0;
                }
            }
            catch (Exception e) {
                Debug.Trace("Perfcounters", "Exception: " + e.StackTrace);
            }
        }
Ejemplo n.º 2
0
 override protected bool ReleaseHandle()
 {
     UnsafeNativeMethods.PerfCloseAppCounters(handle);
     handle = IntPtr.Zero;
     return(true);
 }