harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r574963 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared: luniglob.c nethelp.c
Date Wed, 12 Sep 2007 14:12:05 GMT
Author: hindessm
Date: Wed Sep 12 07:12:04 2007
New Revision: 574963

URL: http://svn.apache.org/viewvc?rev=574963&view=rev
Log:
Use non-weak global references for classes and make sure we destroy
them all.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c?rev=574963&r1=574962&r2=574963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c Wed
Sep 12 07:12:04 2007
@@ -416,19 +416,31 @@
   /* clean up class references */
   classRef = HARMONY_CACHE_GET (env, CLS_java_lang_Boolean);
   if (classRef)
-    (*env)->DeleteWeakGlobalRef (env, (jweak) classRef);
+    (*env)->DeleteGlobalRef (env, classRef);
 
   classRef = HARMONY_CACHE_GET (env, CLS_java_lang_Byte);
   if (classRef)
-    (*env)->DeleteWeakGlobalRef (env, (jweak) classRef);
+    (*env)->DeleteGlobalRef (env, classRef);
 
   classRef = HARMONY_CACHE_GET (env, CLS_java_lang_Integer);
   if (classRef)
-    (*env)->DeleteWeakGlobalRef (env, (jweak) classRef);
+    (*env)->DeleteGlobalRef (env, classRef);
 
   classRef = HARMONY_CACHE_GET (env, CLS_java_net_InetAddress);
   if (classRef)
-    (*env)->DeleteWeakGlobalRef (env, (jweak) classRef);
+    (*env)->DeleteGlobalRef (env, classRef);
+
+  classRef = HARMONY_CACHE_GET (env, CLS_java_net_Socket);
+  if (classRef)
+    (*env)->DeleteGlobalRef (env, classRef);
+
+  classRef = HARMONY_CACHE_GET (env, CLS_java_lang_Long);
+  if (classRef)
+    (*env)->DeleteGlobalRef (env, classRef);
+
+  classRef = HARMONY_CACHE_GET (env, CLS_java_net_Inet6Address);
+  if (classRef)
+    (*env)->DeleteGlobalRef (env, classRef);
 
   classRef = HARMONY_CACHE_GET (env, CLS_array_of_byte);
   if (classRef)

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c?rev=574963&r1=574962&r2=574963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c Wed
Sep 12 07:12:04 2007
@@ -43,7 +43,7 @@
   lookupClass = (*env)->FindClass (env, "java/lang/Boolean");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   mid = (*env)->GetMethodID (env, lookupClass, "<init>", "(Z)V");
@@ -60,7 +60,7 @@
   lookupClass = (*env)->FindClass (env, "java/lang/Byte");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   mid = (*env)->GetMethodID (env, lookupClass, "<init>", "(B)V");
@@ -77,7 +77,7 @@
   lookupClass = (*env)->FindClass (env, "java/lang/Integer");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   mid = (*env)->GetMethodID (env, lookupClass, "<init>", "(I)V");
@@ -94,7 +94,7 @@
   lookupClass = (*env)->FindClass (env, "java/net/InetAddress");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   fid = (*env)->GetFieldID (env, lookupClass, "ipaddress", "[B");
@@ -161,7 +161,7 @@
   lookupClass = (*env)->FindClass (env, "java/net/Socket");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   mid =
@@ -188,7 +188,7 @@
   lookupClass = (*env)->FindClass (env, "java/lang/Long");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   HARMONY_CACHE_SET (env, CLS_java_lang_Long, globalRef);
@@ -199,7 +199,7 @@
   lookupClass = (*env)->FindClass (env, "java/net/Inet6Address");
   if (!lookupClass)
     return;
-  globalRef = (*env)->NewWeakGlobalRef (env, lookupClass);
+  globalRef = (*env)->NewGlobalRef (env, lookupClass);
   if (!globalRef)
     return;
   HARMONY_CACHE_SET (env, CLS_java_net_Inet6Address, globalRef);



Mime
View raw message