John Ormerod 6.Feb.09 02:04 PM Lotus Notes Client for Desktop6.1.2Windows XP
This relates to my earlier entry. I decided to create a simple view/perspective to investigate this. I used the 'rich client' template when creating the perspective. I integrated in to the product - which means the perspective is opened from our Navigation Bar rather than the Launch button.
I found a bmp that is 16 meg. I defined an array list to hold it as an image:
private ArrayList<Image> imageBuffer = null;
I modifed the Listener for the push button, to read this image into imageBuffer each time it is clicked:
imageBuffer.add(addImage());
Watching the memory usage for the client, I could see that the memory used, increased by 16 meg each time I clicked. When I closed the perspective, the dispose() method ran the following code to remove all references from the arrayList to the image objects, and 'encouraged' GC:
publicvoid dispose() { super.dispose();
imageBuffer.removeAll(imageBuffer);
imageBuffer = null;
r.gc();
System.runFinalization(); // Give it even more encouragement...
}
But, the memory usage according to Task Manager remaind the same. So, I closed the 'memory grab' perspective and went away for and hour, to provide time for more GC, in case that was needed for the unused memory to be freed.
BTW, this is the 1.5 DRE.
What do you have to do to lose this transiently used memory?