• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory leak in swing

 
saurabh nitrrr
Greenhorn
Posts: 3
  • 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: 4469
3
Java Python Scala
  • 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
Posts: 2895
46
  • 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
  • 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: 20613
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saurabh nitrrr, please BeForthrightWhenCrossPostingToOtherSites.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic