DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=25372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=25372

auto close idle connections





------- Additional Comments From [EMAIL PROTECTED]  2004-04-09 17:37 -------
Oleg, you're correct, at least according to the java language spec.
Unfortunately, the VM implementation seems to cause some serious issues. The
following code does nothing, as it should:

while(true) new Object();

The next piece of code, however, dies with an out of memory exception:

while(true) new java.util.zip.Deflater();

Deflater has a finalizer that frees up memory. For the life of me, I can't
reconcile this fact with the wording of the language spec. Sun has refused to
fix the above:
http://developer.java.sun.com/developer/bugParade/bugs/4094554.html
It's also odd that System.gc() is a different call than System.runFinalization()
(from the spec wording, you wouldn't expect that).
I believe this is the reason SWT component have to be disposed and don't rely on
finalizers. The situation is even trickier with sockets, because even after a
socket is closed, it has to go into TIME-WAIT. 


Thanks
Moh

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to