This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
globalizing java object references
- To: java-discuss at sourceware dot cygnus dot com
- Subject: globalizing java object references
- From: Oskar Liljeblad <osk at hem dot passagen dot se>
- Date: Fri, 3 Mar 2000 23:11:11 +0100
From the CNI docs:
"If you need to save a pointer to a Java object inside some non-Java data
structure, you first need to "pin" or "globalize" the pointer; there is
no CNI function to do this yet."
Is it possible to circumvent this somehow? Or are there plans to
implement this in a near future?
I'm (still) experimenting with interfacing Gtk in java using CNI.
It may be reasonable to store a reference in each GtkObject to the
corresponding Java object (if any). (Gtk has convenient functions for
doing this, gtk_object_{get,set,remove}_data.) But this would not be
possible right now, because the way Java objects are memory managed?
Oskar Liljeblad (osk@hem.passagen.se)