@Override public void flush() { if (gi != 0) { if (WinGraphicsDevice.useGDI) WinGDIGraphics2D.disposeGraphicsInfo(gi); else WinGDIPGraphics2D.disposeGraphicsInfo(gi); gi = 0; } if (surface != null) surface.dispose(); super.flush(); }
@Override protected void finalize() throws Throwable { flush(); super.finalize(); }