Dispose() public method

public Dispose ( ) : void
return void
        private void Dispose(bool disposing)
        {
            if (this.disposedValue == false)
            {
                if (disposing)
                {
                    // Dispose managed resources.
                }

                // Dispose unmanaged resources.
                {
                    Renderbuffer depthBuffer = this.depthBuffer;
                    if (depthBuffer != null)
                    {
                        depthBuffer.Dispose();
                    }
                }
                {
                    Renderbuffer[] array = this.colorBufferList.ToArray();
                    foreach (var item in array)
                    {
                        item.Dispose();
                    }
                }
                {
                    glDeleteFramebuffers(this.frameBuffer.Length, this.frameBuffer);
                }
            }

            this.disposedValue = true;
        }
        private void Dispose(bool disposing)
        {
            if (this.disposedValue == false)
            {
                if (disposing)
                {
                    // Dispose managed resources.
                }

                // Dispose unmanaged resources.
                {
                    Renderbuffer depthBuffer = this.depthBuffer;
                    if (depthBuffer != null)
                    {
                        depthBuffer.Dispose();
                    }
                }
                {
                    Renderbuffer[] array = this.colorBufferList.ToArray();
                    foreach (var item in array)
                    {
                        item.Dispose();
                    }
                }
                {
                    IntPtr context = GL.Instance.GetCurrentContext();
                    if (context != IntPtr.Zero)
                    {
                        glDeleteFramebuffers(this.frameBuffer.Length, this.frameBuffer);
                    }
                }
            }

            this.disposedValue = true;
        }