I agree.

Maarten

On 11/28/06, peter royal <[EMAIL PROTECTED]> wrote:

On Nov 27, 2006, at 6:51 PM, [EMAIL PROTECTED] wrote:
> +    protected void finalize() throws Throwable
> +    {
> +        super.finalize();
> +        try
> +        {
> +            selector.close();
> +        }
> +        catch( IOException e )
> +        {
> +            ExceptionMonitor.getInstance().exceptionCaught( e );
> +        }
> +    }

How about an explicit .close() or similarly-named method so its not
necessary to rely on finalization?

I'm against having finalization be the only way to have the selector
be closed, as it is bad practice to use finalizers as destructors.

-pete


--
[EMAIL PROTECTED] - http://fotap.org/~osi






Reply via email to