Thank you for answering my question. I work on a Widows NT PC (Dell 180 MHz, 32 MB RAM). When I use the appletviewer (IDE Symantec Cafe 1.51) the flushing (myImages[i].flush()) helps a little bit. That means some part of the old images must have been flushed, but still the memory load grows with every new loaded set of images, same with Netscape 4.0. I still have to try MS IE.
Regards, "mug"
Main Topics
Browse All Topics





by: garikPosted on 1997-06-12 at 10:25:15ID: 1221606
Couple of things you can do: first, call garbage collector after loading a new set of images (it's sufficient for MS IE, but Netscape is reluctant to satisfy GC requests); second, free image resources before loading a new image: , fullImgName); s[i],i);
...
for (int i=0; i < numOfImages; i++) {
String fullImgName = imgDirName +"/"+ imgFileName + i +".gif";
if(myImages[i] != null)
myImages[i].flush();
myImages[i] = getImage(getDocumentBase()
myTracker.addImage(myImage
}
System.gc();
...
As I said, this works fine in IE but poorly in Netscape 3.0. I haven't tried it in the final release of Communicator yet, but I'm going to in the next couple of days and will let you know.