Results 21 to 21 of 21
- 02-18-2014, 11:55 PM #21Senior Member
- Join Date
- Jan 2013
- Northern Virginia, United States
- Rep Power
Re: OutOfMemory Error when read in pictures
Sounds to me like you could do a couple of things.
1. Load them lazily - i.e. as needed which I believe you were alluding too.
2. And maintain a cache of them (sized for your needs).
3. Consider using SoftReferences for storing the images. SoftReferences are guaranteed to be GC'd prior to any "out of memory exception" as long as
there are no hard references to the same object. SoftReference (Java Platform SE 7 )
Last edited by jim829; 02-19-2014 at 01:42 AM.
- By vastrolorde in forum New To JavaReplies: 3Last Post: 04-25-2013, 07:47 PM
- By joshua in forum EntertainmentReplies: 22Last Post: 07-25-2012, 10:51 PM
- By naveensh in forum XMLReplies: 1Last Post: 01-20-2010, 05:52 PM
- By v.svetoslavov in forum Advanced JavaReplies: 7Last Post: 01-30-2009, 07:40 AM
- By bdyarem in forum New To JavaReplies: 16Last Post: 08-05-2008, 12:34 PM