David Bélanger wrote:
I think Etienne did these two changes, I'm not sure. Maybe Etienne
could answer your questions on these.
java_io_File.c: Basically, it frees a local ref, I guess otherwise it may
run out of local refs for a long directory listing.
(*env)->SetObjectArrayElement(env, filearray, i, str);
+ (*env)->DeleteLocalRef (env, str);
Yes. This was a bug in Classpath. One needs to free native locals, as they
consume memory. A virtual machine only garantees the availability of 16 local
refs, by default (JNI Spec). To get more, one must do the appropriate JNI
calls.
ObjectInputStream.java: I don't understand ClassLoader enough to explain this
one.
- return cl.loadClass (osc.getName ());
+ return Class.forName (osc.getName (), false, cl);
The idea is that "initialization" should NOT be triggered. cl.loadClass will
initialize the class; this is why we should use Class.forName.
Etienne
--
Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/
SableVM: http://www.sablevm.org/
SableCC: http://www.sablecc.org/
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath