This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CNI Memory Management


On Thursday, June 12, 2003, at 12:07 PM, Craig A. Vanderborgh wrote:

My JNI-to-CNI porting work is going very well.  CNI is a wonderful
thing, at least compared to JNI!!

Anyway, my question is this: When I use things like JvNewByteArray() to
create a byte array, do I have to free it when I'm finished using it?
Or are such CNI allocations handled by GC?

Yes - Java objects are always allocated by the GC. JvNewByteArray() is no exception - think of it as the CNI equivalent of "new byte[...]" in Java.


Bryce.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]