On Thursday, 02/20/2003 at 11:17 CET, "Tomas Bonilla Rau" <[EMAIL PROTECTED]> wrote:
> does anynone know what the VM does with an object when calling one of its > instance methods (synchronized).I am having problems when this method makes > a native call and i try to use a previously (global) saved reference as a ...by (global), do you mean created by a call to the JNI function NewGlobalRef? If not, that's likely your problem -- you're passing an old local ref, which is almost automatically garbage. If you are calling NewGlobalRef, what is the nature of the "problem" that occurs? Crash? Panic? Exception? N.B. You can't expect to share a ref between threads -- or to save a ref in static storage for later use, even by the same thread -- unless that ref was returned by NewGlobalRef (or NewWeakGlobalRef). > constructor parameter for new java objects being created (from the native > side obviously). The problem doesn�t appear when the parameter is not the > source of the native call.Thanks HTH. -blair Blair Wyman -- iSeries JVM -- (507) 253-2891 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "It is a sobering thought that when Mozart was my age, he had been dead for two years." -- Tom Lehrer --- You are currently subscribed to jdjlist as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] http://www.sys-con.com/fusetalk
