* Take a global reference to the activity to prevent the reference being GCed
authorTim Angus <tim@blackcompanystudios.co.uk>
Fri, 26 Aug 2011 13:23:40 +0100
changeset 6189b5a665fbaedc
parent 6188 e82023802002
child 6190 519380462400
* Take a global reference to the activity to prevent the reference being GCed
src/core/android/SDL_android.cpp
     1.1 --- a/src/core/android/SDL_android.cpp	Sun Jan 08 02:23:37 2012 -0500
     1.2 +++ b/src/core/android/SDL_android.cpp	Fri Aug 26 13:23:40 2011 +0100
     1.3 @@ -96,7 +96,7 @@
     1.4      __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init()");
     1.5  
     1.6      mEnv = env;
     1.7 -    mActivityClass = cls;
     1.8 +    mActivityClass = (jclass)env->NewGlobalRef(cls);
     1.9  
    1.10      midCreateGLContext = mEnv->GetStaticMethodID(mActivityClass,
    1.11                                  "createGLContext","(II)Z");