Exemple #1
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting managed/unmanaged resources.
        /// </summary>
        /// <param name="disposing">
        /// A <see cref="System.Boolean"/> indicating whether the disposition is requested explictly.
        /// </param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_NativeSurface != null)
                {
                    _NativeSurface.Dispose();
                    _NativeSurface = null;
                }
            }

            // Base implementation
            base.Dispose(disposing);
        }
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting managed/unmanaged resources.
        /// </summary>
        /// <param name="disposing">
        /// A <see cref="System.Boolean"/> indicating whether the disposition is requested explictly.
        /// </param>
        protected override void Dispose(bool disposing)
        {
            // Base implementation
            base.Dispose(disposing);

            // Note: display must be disposed after device context disposition
            if (disposing)
            {
                if (_NativeSurface != null)
                {
                    _NativeSurface.Dispose();
                    _NativeSurface = null;
                }
            }
        }