[1471] in java-interest
Re: native methods and ObjAlloc()
daemon@ATHENA.MIT.EDU (Thomas Ball)
Tue Sep 5 18:40:53 1995
Date: Tue, 5 Sep 1995 08:59:48 -0700
From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
To: jsw@cs.brown.edu
Cc: java-interest@java.Eng.Sun.COM
Objects still have constructors, whether or not one is defined in your
source file. (To verify this, run javap (the Java disassembler) on your
class file.) Consequently, I always call the constructor and never use
ObjAlloc() -- why bother with half-allocated objects when the constructor
will always do the right thing? (resource-wise, that is, as I can't
speak for your code :-)
Tom
> From daemon@java Tue Sep 5 01:52:24 1995
> To: java-interest@java
> Subject: native methods and ObjAlloc()
> X-Info: To unsubscribe, send 'unsubscribe' to java-interest-request@java.sun.com
>
>
> If I want to return an object that has no constructor, I can't use
> execute_java_constructor(). Is ObjAlloc() the correct and sufficient
> thing to use instead of execute_java_constructor() ? And what is the
> second parameter (I've just been using 0)?
>
> thanks,
> jeff
>
> --------------------------------------------------------------------
> | Jeff White jsw@cs.brown.edu http://www.cs.brown.edu/people/jsw/ |
> | "So you run and you run to catch up with the sun but it's sinking |
> | Racing around to come up behind you again" - pink floyd |
> --------------------------------------------------------------------
> -
> Note to Sun employees: this is an EXTERNAL mailing list!
> Info: send 'help' to java-interest-request@java.sun.com
>
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com