harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r575039 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/proxy.c
Date Wed, 12 Sep 2007 18:46:36 GMT
Author: hindessm
Date: Wed Sep 12 11:46:36 2007
New Revision: 575039

URL: http://svn.apache.org/viewvc?rev=575039&view=rev
Log:
Avoid memory leak - JNI_COMMIT doesn't release memory just copies the
bytes back and this is unnecessary since the bytes are not modified.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/proxy.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/proxy.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/proxy.c?rev=575039&r1=575038&r2=575039&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/proxy.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/proxy.c Wed Sep
12 11:46:36 2007
@@ -47,7 +47,7 @@
 
   returnClass = (*env)->DefineClass (env, name, classLoader, bytes, length);
 
-  (*env)->ReleaseByteArrayElements (env, classBytes, bytes, JNI_COMMIT);
+  (*env)->ReleaseByteArrayElements (env, classBytes, bytes, JNI_ABORT);
   (*env)->ReleaseStringUTFChars (env, className, name);
   return returnClass;
 }



Mime
View raw message