From 25a9c90b543f181fe8ebbf474d240e0f342776ac Mon Sep 17 00:00:00 2001 From: HueyPark Date: Sun, 26 Apr 2015 20:52:09 +0900 Subject: [PATCH] Fix android http client memory leak --- cocos/network/HttpClient-android.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/network/HttpClient-android.cpp b/cocos/network/HttpClient-android.cpp index f389dc41b6..421c2b35a9 100644 --- a/cocos/network/HttpClient-android.cpp +++ b/cocos/network/HttpClient-android.cpp @@ -422,6 +422,7 @@ private: jobject jObj = methodInfo.env->CallStaticObjectMethod(methodInfo.classID, methodInfo.methodID, jurl); _httpURLConnection = methodInfo.env->NewGlobalRef(jObj); methodInfo.env->DeleteLocalRef(jurl); + methodInfo.env->DeleteLocalRef(jObj); methodInfo.env->DeleteLocalRef(methodInfo.classID); } }