This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
CNI and garbage collection
- From: "Daniel Walter" <d2walter at hotmail dot com>
- To: <java at gcc dot gnu dot org>
- Date: Sat, 13 Dec 2008 17:55:38 -0500
- Subject: CNI and garbage collection
As I look through the documentation of CNI, I have not found anything about
how Garbage Collection is done. Is there a section on this?
Questions on GC.
1. In section 11.8 of the manual, a hashtable is created with new
java::util::Hashtable(120). How is this deallocated? Based on what I have
seen, it would need to be deleted in C++ which would release it to the GC to
decide when Java is done with it for actual destruction. Is this correct?
2. If I get a reference to an object as a result of a function call, how
does this effect Garbage Collection of this object. Do I need to delete
this object for Garabage Collection.
Daniel