Bug 691

Summary: OSX (Offscreen CALayer): Layers and native GL-Context are _not_ Released
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: macosxAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: critical    
Priority: P1    
Version: 2   
Hardware: All   
OS: macosx   
Type: --- SCM Refs:
f6e6fab2a7ddfb5c9b614cb072c27ff697629161 2aeff053c55dadafb94bfbba661250e0c96f1fe5 d178475967536f4d1e58fd6e0be49b03fe4cd4b7 a94ff9252df66c303f48489c3e8926104941465c
Workaround: ---
Bug Depends on: 1019    
Bug Blocks:    

Description Sven Gothel 2013-02-14 03:59:27 CET
Our created CALayer and NSOpenGLLayer, attached to the JAWT surface
are not released when we properly try to release them via our release calls to:
  - CGL.releaseNSOpenGLLayer(..) 
  - OSXUtil.RemoveCASublayer(..)
  - OSXUtil_DestroyCALayer(..)

The native NSOpenGLLayer's GL-Context is also retained.

This leaks leads to stalling and eventual crash of the desktop.
Comment 1 Sven Gothel 2013-02-14 04:18:03 CET
Updated complete release sequence ..

Context unrealized:
  - JAWTWindow.detachSurfaceLayer() -> OSXUtil.RemoveCASublayer(..)
  - CGL.releaseNSOpenGLLayer(..) 
 
JAWTWindow.destroy()
  - MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..)
  - OSXUtil.DestroyCALayer(..)
Comment 3 Sven Gothel 2013-02-14 19:43:36 CET
Reopened: SIGSEGV w/ NewtCanvasAWT due to new resource release .. investigating.
Comment 5 Sven Gothel 2014-06-12 08:19:11 CEST
Finally solved - see Bug 1019