About OutofmemoryException [message #466714] |
Sun, 15 January 2006 22:47  |
Eclipse User |
|
|
|
Originally posted by: shikai.cn.ibm.com
In RCP application,if an OutofMemoryException is raised up,how can I do with
it??I used System.gc(),however it seems do not work.
|
|
|
|
|
|
|
|
Re: About OutofmemoryException [message #466873 is a reply to message #466818] |
Wed, 18 January 2006 14:56  |
Eclipse User |
|
|
|
Nope, that's not true. OutOfMemoryException happens when you try to create
a Java object. I suppose it could happen that so many operating system
objects have been leaked that when Java needs to grow object memory, the
operating system malloc() call fails but I've never seen this happen.
Hey Alex, my intent is not to argue or split hairs with you. I just want to
make sure that people reading this look for Java object leaks rather than
operating system resource leaks when they get this error. That's all.
"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:28889593.1137535006291.JavaMail.root@cp1.javalobby.org...
> That isn't necessarily true, although it may well be in this case. Passing
objects across the JNI barrier can leak references to Java objects which
can't then be garbage collected. For example, one might have a Table UI that
is connected to a Table Model. Create enough of those and you may end up
with a number of dangling references from JNI into the Java VM, which
subsequently causes the Java VM to throw this exception.
>
> Note: I'm not saying that the Table in SWT suffers from it; I'm just using
it as an example of what might occur.
>
> Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.04207 seconds