Re: Java and C
Re: Java and C
- Subject: Re: Java and C
- From: Brian Hill <email@hidden>
- Date: Wed, 29 Aug 2001 10:54:19 -0500
On Wednesday, August 29, 2001, at 10:30 AM, Smith, Bradley wrote:
Java in a Cocoa app is just another programming language. It will be
compiled into native PowerPC code so it'll be quicker than a pure Java
app.
Pure Java means compiling to byte code that will run on any compliant
JVM on
any platform; there must be an overhead for this.
Negative. Java in a Cocoa app is just Java bytecode like any other Java
app.
It DOES NOT get compiled into native PowerPC code, although there
appears to be a weird misconception in some circles that it does. Look
inside the wrapper of a Cocoa Java program, and you will find the
regular .jar file that the application's code lives in. The mach-o
executable is mainly just there to load the JVM and the application's
jar file.
What I want to know is about the garbage collection (GC). Pure Java does
auto GC - albeit badly most of the time. how does it work in Cocoa? Can
we
just write our code allocating memory willy-nilly and let the system
sort it
out?
It works just like 'Pure' Java. It's still the same Java bytecode.
Brian
email@hidden
http://personalpages.tds.net/~brian_hill
___________________________________________________________
"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman
___________________________________________________________