Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #595

Re: Memory Leak in swing

From "cakmak" <cakmak@THRWHITE.remove-dii-this>
Subject Re: Memory Leak in swing
Message-ID <1168260927.897195.321070@s34g2000cwa.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <1168259448.325939.112740@42g2000cwt.googlegroups.com>
Date 2011-04-27 15:28 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
thank you for the rapid answer. Interesting point what you have
mentioned. I have not only image objects, there are some bigger objects
which contains these. As the result the grow of  memory leak is
accelerated.  I will change my implementation and post a feed back.
cem b.


Andrew Thompson wrote:
> cakmak wrote:
> > When I profile my swing application I notice that after each tidy up my
> > image container
> ...
> >                     //load the image from the database, every stream
> > are closed properly!
> >                     Image image =
> > DbInterfaceEtrainer.getInstance().getPersonImage(personNr);
> >
> >                     assert(image != null);
> >                     ImageIcon icon = new ImageIcon(image);
> ...
> > Any idea? thank you.
>
> The JVM is notorious for caching images.  While this
> is usually a help for inexperienced programmers, it is
> a hindrance for anything else.
>
> Doing an image slideshow, the only way I found to avoid
> image caccing was to load it into a  byte[] array anf use
> the constructor that accepts a byte array.
> 
> I do not know if that is practical for your DB.
> 
> Andrew T.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Memory Leak in swing appl "cakmak" <cakmak@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
  Re: Memory Leak in swing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
    Re: Memory Leak in swing "cakmak" <cakmak@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
      Re: Memory Leak in swing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
  Re: Memory Leak in swing "cakmak" <cakmak@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
    Re: Memory Leak in swing "cakmak" <cakmak@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
      Re: Memory Leak in swing "steve" <steve@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
        Re: Memory Leak in swing "cakmak" <cakmak@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
          Re: Memory Leak in swing "steve" <steve@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
      Re: Memory Leak in swing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000
      Re: Memory Leak in swing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:28 +0000

csiph-web