mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 01:30:10 +00:00
7176644: [macosx] Missing NSAutoreleasePool in CGLGraphicsConfig.m OGLGC_DestroyOGLGraphicsConfig
Create and drain an autorelease pool Reviewed-by: anthony, dcherepanov
This commit is contained in:
parent
f6020a8e34
commit
bf4e37de48
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user