File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Memory leak in swing" Watch "Memory leak in swing" New topic

Memory leak in swing

saurabh nitrrr

Joined: Aug 17, 2011
Posts: 3

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

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

Visit my download page
Tim Moores

Joined: Sep 21, 2011
Posts: 2409
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

Rob Spoor

Joined: Oct 27, 2005
Posts: 19908

saurabh nitrrr, please BeForthrightWhenCrossPostingToOtherSites.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: Memory leak in swing