Results 1 to 8 of 8
Thread: Memory leak in swing
- 12-07-2011, 08:27 PM #1
Member
- Join Date
- Dec 2011
- Posts
- 3
- Rep Power
- 0
Memory leak in swing
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.
- 12-07-2011, 08:29 PM #2
Re: Memory leak in swing
Chances are this is a memory leak in your code, not in Swing. Can you reproduce the problem with an SSCCE?
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 12-07-2011, 08:45 PM #3
Member
- Join Date
- Dec 2011
- Posts
- 3
- Rep Power
- 0
Re: Memory leak in swing
Do u have any idea why keyboard manager is having reference to the closed frame?? I guess it is internally handle by swing when any component become invisible.
- 12-07-2011, 08:47 PM #4
Re: Memory leak in swing
Without seeing an SSCCE, I have no idea why any of the code is doing anything.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
-
Re: Memory leak in swing
This is a known issue associated with Swing's use of strong references when you want to use weak ones. There are work arounds to be found if you Google the terms -- java swing references memory strong weak --
- 12-07-2011, 09:42 PM #6
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
- 12-07-2011, 09:56 PM #7
Member
- Join Date
- Dec 2011
- Posts
- 3
- Rep Power
- 0
Re: Memory leak in swing
Yes, I think it is a swing bug. Detailed explanation is given below
bestsss here: Swing and the Leaks (part 1 of ...)
- 12-08-2011, 03:52 AM #8
Re: Memory leak in swing
This is the first time I've seen somebody claim to have found a bug when it was actually a bug. Well done. Sorry for my skepticism.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
what are the memory profiling tools available that can help me detect memory leak?
By guest_user in forum New To JavaReplies: 1Last Post: 07-18-2011, 04:24 PM -
Memory Leak questions, code review
By mensaFool in forum Advanced JavaReplies: 9Last Post: 03-08-2010, 04:27 PM -
Help I have a memory leak...
By cdman52 in forum Java AppletsReplies: 10Last Post: 09-28-2009, 10:37 PM -
java.util.logging.StreamHandler memory leak?
By toadaly in forum Advanced JavaReplies: 1Last Post: 02-23-2009, 02:46 PM -
Memory Leak using a Swing Application Project
By iimasd in forum AWT / SwingReplies: 0Last Post: 11-27-2007, 10:20 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks