File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Memory leak in swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Memory leak in swing" Watch "Memory leak in swing" New topic
Author

Memory leak in swing

saurabh nitrrr
Greenhorn

Joined: Aug 17, 2011
Posts: 3
Hi,

I am facing memory leak problem in my swing based application. After following a series of steps (after opening and closing same frame 10 - 15 times) application is throwing OOM exception on GUI. When I analyzed heap dump with EMA (eclipse memory analyzer) it is showing that the common point of accumulation is KeyboardManager which is holding the reference in the collection to the object on the frame which is not visible on GUI. Please help me who we can dereference all object from keyboard manager.

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

you can try calling System.gc() but you probably tried that already.


SCJP
Visit my download page
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
you can try calling System.gc()

There's no point in doing that - if the JVM is low on memory it will reclaim all GC-able object by itself.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
no point wasting everyone's time here, duplicating the many responses you've already had

http://www.java-forums.org/awt-swing/52310-memory-leak-swing.html

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20

saurabh nitrrr, please BeForthrightWhenCrossPostingToOtherSites.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Memory leak in swing