On Jan 30, 2012, at 1:52 AM, Sergey Bylokhov wrote: > 30.01.2012 13:44, Sergey Bylokhov wrote: >> Hi Dmitry, >> I have a question about CGLLayer.m >> >> 124JNFCallVoidMethod(env, [self.javaLayer jObjectWithEnv:env], >> jm_drawInCGLContext); >> >> Should we delete a local reference which returned from [self.javaLayer >> jObjectWithEnv:env]? And check it for null? > JNFJObjectWrapper.h > ...... > - (jobject) jObjectWithEnv:(JNIEnv *)env; // returns a new local-ref, must be > released with DeleteLocalRef > ...... >> >> >> 30.01.2012 13:54, Dmitry Cherepanov wrote: >>> This is a request to push the following fix to jdk7u-osx: >>> >>> CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7131793 >>> >>> Webrev: http://cr.openjdk.java.net/~dcherepanov/7131793/webrev.2 >>> >>> Technical review: >>> http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-January/002537.html >>> >>> Thanks, >>> Dmitry
I believe local refs are collected after the scope of the local function returns, so I don't believe it's strictly necessary. Is that right? Regards, Mike Swingler Apple Inc.
