diff options
author | Sven Gothel <[email protected]> | 2011-12-23 04:57:41 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-23 04:57:41 +0100 |
commit | 04707d3c1c628d6bf493d6916621d5e34dfefc30 (patch) | |
tree | 97985cf1d3002611443303b100e8b5c8affa4805 /src/newt/classes | |
parent | 3f5df93484a2ea97c6e51a717f05d9ddcec64d84 (diff) |
NEWT/OSX MacWindow.close(): More conservative closing approach.
Closing:
- Java: Set handle to null
- Native:
- Don't release the NSView explicit, but rely on NSWindow's release
- Don't use NSWindow close() but simply call release() instead.
The latter doesn't produce a crash SIGSEGV on exit in some cases.
OSX 10.7.2, NV GPU
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java index 47c599a25..75a3cf6d5 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java @@ -87,6 +87,9 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl } } finally { setWindowHandle(0); + surfaceHandle = 0; + sscSurfaceHandle = 0; + isOffscreenInstance = false; } } @@ -394,8 +397,8 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl private static final int NSBackingStoreNonretained = 1; private static final int NSBackingStoreBuffered = 2; - private volatile long surfaceHandle; - private long sscSurfaceHandle; - private boolean isOffscreenInstance; + private volatile long surfaceHandle = 0; + private long sscSurfaceHandle = 0; + private boolean isOffscreenInstance = false; } |