Oops,


> Also, to truly override finalize of the Java native classes,
> finalize must be declared protected, not private as I formerly stated or
> public as in Karsten's code.

thanks for the correction. Lazyness is always awkward.

> protected void finalize() throws Throwable {
>     // your code / print outs
>     // watch out not to cause an exception. it will not be reported,
> since the system will catch them silently
>     ....
>     // this is very important, never forget it. The super class could
> free memory of native code
>     super.finalize();
> }

One step further would be

protected void finalize() throws Throwable {

    try {

       // your code / print outs

    }
    catch ( Throwable e ) {

        // we are lucky having our own exception caught and we get feedback
        e.printStackTrace();

    }

   // this is very important, never forget it. The super class could free
memory of native code
   super.finalize();}

}

> Have a great day,

You too!

Cheers,
Karsten

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to