File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory leak in swing

 
saurabh nitrrr
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4353
2
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try calling System.gc() but you probably tried that already.
 
Tim Moores
Bartender
Pie
Posts: 2491
7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saurabh nitrrr, please BeForthrightWhenCrossPostingToOtherSites.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic