Duality.Resources.ShaderProgram.OnDisposing C# (CSharp) Method

OnDisposing() protected method

protected OnDisposing ( bool manually ) : void
manually bool
return void
        protected override void OnDisposing(bool manually)
        {
            base.OnDisposing(manually);
            if (DualityApp.ExecContext != DualityApp.ExecutionContext.Terminated &&
                this.glProgramId != 0)
            {
                this.DetachShaders();
                GL.DeleteProgram(this.glProgramId);
                this.glProgramId = 0;
            }
        }