Hi,
I am working with images serialized in the database. What I want is to display a collection of images in my application. Up to this point no problem. The problem arises after examining 3 or 4 collections, that I get an OutOfMemory Error (Java Heap Space). If I don't check the collections the error doesn't show up. Where is the problem? In my pojo's I already load lazily the serial representation of images, and inside my application I make a call to gc() in order to cleanup resources when the window containing the slide show for a collection is hidden.
The image serial representation is stored in a field fetched lazily. The holding instance is stored in an ArrayList. The curious thing is that if I don't call the getter methods of the serial representations but only want to know the size() of the collection, the error still arises although the field is lazily loaded. How is that possible?
Any help is greatly appreciated.
Carlos.
|