提交 84aaaa48 编写于 作者: A anthony

7176644: [macosx] Missing NSAutoreleasePool in CGLGraphicsConfig.m OGLGC_DestroyOGLGraphicsConfig

Summary: Create and drain an autorelease pool
Reviewed-by: anthony, dcherepanov
Contributed-by: NTomas Hurka <tomas.hurka@googlemail.com>
上级 d645c289
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册