Re: [Java-gnome-developer] Use of destroy()
Brought to you by:
afcowie
From: Robert M. <ro...@ma...> - 2004-10-30 15:16:59
|
On Sat, 2004-10-30 at 11:01, Jerry Haltom wrote: > You're right. What I meant was that we have NO way to manage memory in > Java. It happens behind the scenes, on a GC process. So, we need to > either tie into this process, which I don't think we can, or have our > own "cleanup" process to delete C instances when the Java instance dies. > This is the ref count idea. We scan our map, find items with a dead Java > instance, and unref them, and remove them from the map. We are no longer > using them. There is a way to get information about the reachability of a Java object, Someone knows about the status of this classes on GNU Classpath? http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/ReferenceQueue.html > > Our Java wrapper instances will stay alive as long as there is a > reference to them. After they loose all references, they will die at > some undetermined time in the future. If the object is being used in a > signal handler, it will not be GC'd. > > You're C++ way of storing it in the data of the GObject is good... > however, we need a way to map Java->Object to GObject as well. Java also > conveniently lacks an efficient way to do this. ________________________________________ Robert Marcano |