From 83caa059fb75a112d89f528610b3d61485bc37ef Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 29 Oct 2012 23:19:01 +0000 Subject: [PATCH] - release pool in iOS image loader when exiting early git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9917 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/ios/jme-ios.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/ios/jme-ios.m b/engine/src/ios/jme-ios.m index d62bb01e8..ef978a806 100644 --- a/engine/src/ios/jme-ios.m +++ b/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]; if(inputImage == nil){ [inData release]; + [pool release]; return nil; } 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); if (checkJNIException(e)) { [inData release]; + [pool release]; return nil; } void *rawData = (*e)->GetDirectBufferAddress(e, nativeBuffer);