Though this is not directly Java-Linux related, I think it is important to
mention this on this mailing list, since it is important to distinguish Java
problems from Java-on-Linux problems (if there are problems with Java on
Linux, people tend to blame it on Linux ...):
The finalize() issue seems to cause lots of problems. It is not completely
clear whether it works or not (IMHO not even for SUN themselves). According to
my tests (SUN JDK 1.2 reference implementation - just to be completely on the
safe side) it does not work satisfactory (at all ?).
I've tested finalize() with a server app - and no finalize() method gets
called after I delete all by references to my test objects. A bug parade check
gives contradicting results:
Bug Id 4148454 (State Closed, not a bug)
"The System.runFinalization method can only invoke the finalize methods of
objects that that garbage collector has detected as being "finalizer
reachable." Unfortunately, the conservative GC in the "classic" VM sometimes
can't classify an object that way because there's a stray pointer to it
somewhere in a native stack. This is most likely what is happening in the
submitter's case; it works in JDK 1.1.5 out of sheer luck. The only way to
guarantee that you've dropped all references to an object is to ensure that
all threads that have ever referenced the object have terminated."
IMHO this is NOT satisfactory, especially if you write servers that heavily
consume resources (like I do), because this actually means that resource
consumption can possibly grow infinitely and the programmer cannot do anything
against it.
Even more confusing is the follwoing statement (Bug Id 4102959, State Closed,
will not be fixed) :
"According to the bugs database, this is only the third time that anyone's
noticed that we've never implemented class finalization. --
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
xxxxx@xxxxx 1/9/1998
Please see 4108421 "Remove class finalization from JLS". Because of that
proposal, this bug will not be fixed. xxxxx@xxxxx 1998-04-07"
A search for 4108421 gives: "Results: No bug found"
Hmmmmm ?!
Any opinions ?
Manfred
--
[EMAIL PROTECTED]
http://www.infosys.tuwien.ac.at/Staff/pooh/
---------------------------------------------------------------------------
"Growing old is mandatory. Growing up is optional."