Aiv.Fast2D.Mesh.Dispose C# (CSharp) Метод

Dispose() публичный Метод

public Dispose ( ) : void
Результат void
        public void Dispose()
        {
            if (disposed)
                return;
            #if !__MOBILE__
            GL.DeleteBuffer(this.vBufferId);
            GL.DeleteBuffer(this.uvBufferId);
            GL.DeleteBuffer(this.vcBufferId);
            GL.DeleteVertexArray(this.vertexArrayId);
            #else
            GL.DeleteBuffers(3, new int[] { this.vBufferId, this.uvBufferId, this.vcBufferId });
            GL.DeleteVertexArrays(1, new int[] { this.vertexArrayId });
            #endif
            Window.Current.Log(string.Format("buffer {0} deleted", this.vBufferId));
            Window.Current.Log(string.Format("buffer {0} deleted", this.uvBufferId));
            Window.Current.Log(string.Format("buffer {0} deleted", this.vcBufferId));

            foreach (VertexAttrib customAttrib in this.customBuffers.Values)
            {
            #if !__MOBILE__
                GL.DeleteBuffer(customAttrib.bufferId);
            #else
                GL.DeleteBuffers(1, new int[] { customAttrib.bufferId });
            #endif
                Window.Current.Log(string.Format("buffer {0} deleted", customAttrib.bufferId));
            }

            Window.Current.Log(string.Format("vertexArray {0} deleted", this.vertexArrayId));
            disposed = true;
        }