[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: OutOfMemoryError on event-handling thread

"David Huebel" <davidhuebel@xxxxxxxxxxx> wrote in message 
news:fsjmrp$n9o$1@xxxxxxxxxxxxxxxxxxxx
> Ed Merks wrote:
>
> * set a few references to null, thereby making objects available for GC

This is very important thing as most out of memory error occurs with this.
GC unable to remove used objects. In addition, you should design program
that does not use more than your quota set with -mx parameters.
In places, allicating excessive memory, you may catch "Error" or
"Throwable". Once such thing occurs, show error dialog and exit
program.

Stack allocations errors are mostly from infinite recursion. If you have
methods that call themselves infinitely this happens. In addition, if you
have modules with very deep recusions, you should change them
something that do not use deep recursion!

R.