[gclist] Finalization releasing resources

Mimir Reynisson skelmir@qualia.com
Thu, 27 Mar 1997 16:16:58 -0500


>Because the "guarantees" given by the official *specification* of Java make
>relying on finalization for "reclaiming resources which are heavily
>contended for (file handles) or otherwise where timeliness is important
>(e.g., sockets)" gross negligence, IMHO.  You *cannot* rely on finalization
>*ever* happening.  You *cannot* relying GC *ever* happening.  Yes, this is
>a quality of implementation issue but do you want robust, portable code or
>not?

If I remember correctly the spec do say that implementation may explictly
force gc and finalization when you ask for certain resources. Such as bitmaps,
files, sockets, etc .. some implementation specific heuristics would apply.

Cheers,

Mimir