pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: OutOfMemoryError - after calling ImageView.setImage(url) 50 times
Date Wed, 18 Jul 2012 21:11:59 GMT
Hi Sridhar,

                How is the ImageView being displayed in Pivot?  How
exactly does the update to the next image occur?  Someone else logged a
bug about images used as window icons not being released in the image
listener list, so this sounds a lot like the same problem.

                So, could you provide a small sample program that
demonstrates the problem?  One of us will be looking at the problem.


Thank you for using Pivot,

~Roger Whitcomb


From: Sridhar Sarnobat [mailto:ss401533@gmail.com] 
Sent: Wednesday, July 18, 2012 2:03 PM
To: user@pivot.apache.org
Subject: OutOfMemoryError - after calling ImageView.setImage(url) 50


I have created a slideshow application using Apache Pivot, and it works


But it reaches 285 MB after I cycle through about 50 jpg images, and
starts throwing OOM errors. I have a memory leak that I don't know how
to stop. I am manipulating java.io.File objects (not streams or readers)
and I don't see any way to close these files.


I believe that I am not releasing resources of a File 1 before calling
the following line with File 2:


  org.apache.pivot.wtk.ImageView.setImage( java.io.File.toURI().toURL()


I hope that's enough information. What am I doing wrong? I don't want to
increase the available heap space. This is supposed to be a simple app.

View raw message