Beispiel #1
0
        // ###############################################################################
        // ### D E S T R U C T I O N
        // ###############################################################################

        #region Destruction

        /// <summary>IDisposable implementation.</summary>
        public void Dispose()
        {
            // SimpleLog.LogLine (TraceEventType.Verbose, CLASS_NAME + "::Dispose ()");

            if (_imageSurface.Drawable != IntPtr.Zero)
            {
                X11lib.XFreePixmap(_imageSurface.Display, _imageSurface.Drawable);
                _imageSurface.SetDrawable(IntPtr.Zero);
            }
        }
        // ###############################################################################
        // ### D E S T R U C T I O N
        // ###############################################################################

        #region Destruction

        /// <summary> IDisposable implementation. </summary>
        public void Dispose()
        {
            // Console.WriteLine (CLASS_NAME + "::Dispose ()");

            if (_graphicXImage != IntPtr.Zero)
            {
                // Note: The destroy procedure (_XImage.f.destroy_image), that this macro calls,
                // frees both - the image structure and the data pointed to by the image structure.
                X11lib.XDestroyImage(_graphicXImage);
                _graphicXImage = IntPtr.Zero;
            }
            if (_transpXImage != IntPtr.Zero)
            {
                // Note: The destroy procedure (_XImage.f.destroy_image), that this macro calls,
                // frees both - the image structure and the data pointed to by the image structure.
                X11lib.XDestroyImage(_transpXImage);
                _transpXImage = IntPtr.Zero;
            }
            if (_transpXPixmap != IntPtr.Zero)
            {
                X11lib.XFreePixmap(_display, _transpXPixmap);
                _transpXPixmap = IntPtr.Zero;
            }
        }