I was testing the randomimage pluglet with a directory
tree of 10,000 images. When it init'd the memory usage
shot up from 5MB to 15MB or so, and stayed there.
That's 1KB per image on average. Now, the
RandomMediaFactory should preload on the order of 10
images, which would account for 1MB or so. The rest is
just Vectors of URLs.
I think there may be hanging references to objects that
I'm assuming are getting finalized and GC'd. If that's the
case, I bet it's something like:
Vector v;
for(int i=0;i<10;i++){
v = new Vector();
for(int j=0;j<10;j++){
v.add(new String(i*j*j)); // just some unique strs
}
//v.clear();
//v=null;
}
v=null;
To the best of my knowlege, none of these unique
strings would ever get gc'd. If you uncommented the
clear and the null, they would.
Logged In: YES
user_id=505143
moved to bugs