Ejemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            lock (this)
            {
                // Do nothing if the object has already been disposed of.
                if (disposed)
                {
                    return;
                }

                if (disposing)
                {
                    // Release disposable objects used by this instance here.

                    if (BrushPoint != null)
                    {
                        BrushPoint.Dispose();
                    }
                }

                // Release unmanaged resources here. Don't access reference type fields.

                // Remember that the object has been disposed of.
                disposed = true;
            }
        }
 public void Dispose()
 {
     if (BrushPoint != null)
     {
         BrushPoint.Dispose();
     }
     if (Canvas != null)
     {
         Canvas.Dispose();
     }
 }