Beispiel #1
0
        private bool disposedValue = false; // To detect redundant calls

        /// <summary>
        /// Override this to dispose things in your child class
        /// </summary>
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    GcHandle.Free();
                }

                disposedValue = true;
            }
        }
Beispiel #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             window.Close();
             EventCallback = null;
             swapchain.Framebuffer.Dispose();
             swapchain.Dispose();
             GcHandle.Free();
         }
         disposed = true;
     }
 }