From bf4e37de483f3ef5d1d2ac6cff6f2bf838de2004 Mon Sep 17 00:00:00 2001 From: Tomas Hurka Date: Wed, 13 Jun 2012 18:33:30 +0400 Subject: [PATCH] 7176644: [macosx] Missing NSAutoreleasePool in CGLGraphicsConfig.m OGLGC_DestroyOGLGraphicsConfig Create and drain an autorelease pool Reviewed-by: anthony, dcherepanov --- jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m b/jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m index ba1f2bc59a1..bbe42519694 100644 --- a/jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m +++ b/jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m @@ -63,12 +63,14 @@ OGLGC_DestroyOGLGraphicsConfig(jlong pConfigInfo) CGLCtxInfo *ctxinfo = (CGLCtxInfo *)oglc->ctxInfo; if (ctxinfo != NULL) { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; [NSOpenGLContext clearCurrentContext]; [ctxinfo->context clearDrawable]; [ctxinfo->context release]; if (ctxinfo->scratchSurface != 0) { [ctxinfo->scratchSurface release]; } + [pool drain]; free(ctxinfo); } }