private void Dispose(bool manual) { if (!disposed) { if (manual) { Debug.Print("Disposing {0}", GetType()); joystick_driver.Dispose(); lock (SDL.Sync) { SDL.DelEventWatch(EventFilterDelegate, driver_handle); } DriverHandles.Remove(driver_handle); } else { Debug.WriteLine("Sdl2InputDriver leaked, did you forget to call Dispose()?"); } disposed = true; } }