示例#1
0
文件: Pi2.cs 项目: habi/pi2
        /// <summary>
        /// Disposes resources.
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                // Free any other managed objects here.
            }

            if (OwnsHandle && Handle != IntPtr.Zero)
            {
                PiLib.DestroyPI(Handle);
                Handle     = IntPtr.Zero;
                OwnsHandle = false;
            }

            disposed = true;
        }