• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory Leak.

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've been experimenting with using two instances of a frame in a Swing Application framework application. I'm trying to use a util.Timer to create a frame then hide it, null the reference and recreate another instance.

When I leave this running I eventually run out of heap?? Can anyone explain why as I think that I am only ever using one one reference to an object on the heap.

TimerTestView is just the plain default view created by the framework.

I have put the timer code in the startup() method as follows:



Thanks
Pete
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MAy or may not be the root cause, but all Swing components should be constructed and mutated on the EDT. There's at least one recorded case where failure to do so resulted in OOME.
http://forums.sun.com/thread.jspa?threadID=5406558

edit Another relevant discussion:
http://forums.sun.com/thread.jspa?threadID=5279223
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic