BiomePainter.BitmapSelector.BitmapSelector.Dispose C# (CSharp) Method

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                if(components != null)
                    components.Dispose();
                if (Layers != null)
                {
                    foreach (Layer l in Layers)
                        l.Dispose();
                }
                if (backbufferGraphics != null)
                    backbufferGraphics.Dispose();
                if (backbufferContext != null)
                    backbufferContext.Dispose();

                if (customBrush != null)
                    customBrush.Dispose();
            }
            base.Dispose(disposing);
        }