[6039] in java-interest

home help back first fref pref prev next nref lref last post

dynamic memory allocation in native methods

daemon@ATHENA.MIT.EDU (David P. Hummel)
Sun Mar 17 12:34:54 1996

Date:         Fri, 15 Mar 1996 08:56:16 -0600
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: "David P. Hummel" <dhummel@STR.COM>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>

How does the virtual machine handle the dynamic allocation
of memory in a native method?  Is memory allocated using
malloc() garbage collected?  If so, what conditions cause
the memory to be garbage collected?

The reason I am asking these questions is the following:  I
would like to create a java class that "holds" onto a resource
dynamically allocated in a native method.  I want to hold onto
the resource because it is need by additional native methods
declared in the class.  I can hold onto the resource by storing
its address in the java class.

- David

home help back first fref pref prev next nref lref last post