cocos2d/cocos2d-x — pull request #8577 by ntotani (2014-10-08 09:43:11+00:00)
Title: call detach method on thread exit

When call JniHelper::cacheEnv from native thread (not main thread), thread must call JavaVM:: DetachCurrentThread before exit.

http://developer.android.com/training/articles/perf-jni.html#threads