Re: Alternative to System.runFinalizersOnExit()?
Twisted wrote:
As a rule, if construction of a BufferedInputStream fails, you're
already sunk. Either something has gone seriously wrong or you're flat
Running out of memory is not a crime. NetBeans likes to do it
frequently. If I do run out of memory, I don't want my work to be
trashed because the programmer was clueless. If I'm in a hurry, I might
even want to carry on. Particularly if it only OOMEd because I tried to
load a core into a text editor. There is no excuse for not behaving
gracefully.
There's an unfortunate tendency of Java not to run stably for a long
time -- it slowly exhausts its heap as any nontrivial app on average
Of Java programs, rather than Java itself. Often down to not taking care
over things like exception-safety.
even see touch their own code directly. Not to mention the assorted
Map.Entries and so forth involved in the data structures that
Even IdentityHashMap, which doesn't use Entry in its implementation
(it's a probing hash map, using pairs of array slots for key and value),
doesn't churn Entries.
A Web browser gives a simple example. A new, huge String is probably
involved in every page load, and some ad-encrufted sites will spawn as
I hope not.
is already supposed to be doing something like this, and still my Java
apps tend to gradually grind to a halt...
And so you should be more careful about behaving gracefully.
Tom Hawtin