diff options
author | Kenneth Russel <[email protected]> | 2008-12-20 09:44:54 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-12-20 09:44:54 +0000 |
commit | c62bd461e08fb4c2d2d775364e8edff2b04e5671 (patch) | |
tree | 1ceba9f2fb68719d1a22314e79c6912d70d9fb9d /src/classes/com | |
parent | 6eda9476e8168bacdeb1854540d89bd9db0d5029 (diff) |
Fixed more bugs in glue code generation related to using opaque long
type for pointers returned in arrays: specifically, the return value
of glXChooseFBConfig. However, this fix contains an inherent memory
leak for certain C APIs because the original Buffer is not necessarily
available to be manually freed. Still, fixes remaining problems with
pbuffer support on X11 platforms.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1825 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com')
-rw-r--r-- | src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java index aa84b034a..db3dbc47f 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java @@ -119,6 +119,9 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { true, display, screen); int[] nelementsTmp = new int[1]; + // FIXME: we inherently leak the memory from the underlying call + // to glXChooseFBConfig because a copy of the original Buffer is + // made to expand each pointer from 32 to 64 bits LongBuffer fbConfigs = GLX.glXChooseFBConfig(display, screen, iattributes, 0, nelementsTmp, 0); if (fbConfigs == null || fbConfigs.limit() == 0 || fbConfigs.get(0) == 0) { throw new GLException("pbuffer creation error: glXChooseFBConfig() failed"); |