- release pool in iOS image loader when exiting early

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9917 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent e45a75f2f6
commit 83caa059fb
  1. 2
      engine/src/ios/jme-ios.m

@ -59,6 +59,7 @@ Java_com_jme3_system_ios_IosImageLoader_loadImageData(JNIEnv* e, jclass obj, job
UIImage* inputImage = [UIImage imageWithData:inData]; UIImage* inputImage = [UIImage imageWithData:inData];
if(inputImage == nil){ if(inputImage == nil){
[inData release]; [inData release];
[pool release];
return nil; return nil;
} }
CGImageRef inImage = [inputImage CGImage]; CGImageRef inImage = [inputImage CGImage];
@ -68,6 +69,7 @@ Java_com_jme3_system_ios_IosImageLoader_loadImageData(JNIEnv* e, jclass obj, job
jobject nativeBuffer = (*e)->CallStaticObjectMethod(e, bufferUtilsClass, newBufferMethod, ht*wdth*4); jobject nativeBuffer = (*e)->CallStaticObjectMethod(e, bufferUtilsClass, newBufferMethod, ht*wdth*4);
if (checkJNIException(e)) { if (checkJNIException(e)) {
[inData release]; [inData release];
[pool release];
return nil; return nil;
} }
void *rawData = (*e)->GetDirectBufferAddress(e, nativeBuffer); void *rawData = (*e)->GetDirectBufferAddress(e, nativeBuffer);

Loading…
Cancel
Save