Re: Repeat image loading problem in applet

From: Michael.R.Harris (mrharris_at_rogers.com)
Date: 05/19/04


Date: Wed, 19 May 2004 15:21:21 GMT

Running my applet inside netscape does not exhibit the same symptoms,
everything works fine. Still cannot solve problem in Explorer though; have
tried
- overwritting destroy to flush each image then call System.gc then
super.destroy
- call System.gc at start of each game
- inserting a MediaTracker to wait for all images to load before allowing
thread to run
Images certainly load more cleanly but when the third game loads the
problems start and only get resolved by opening a new browser window. I am
beginning to think I will have to open each game in new window to force the
complete clean up of resources in the JavaVM but this will be very
cumbersome.

Thanks for your suggestions BTW....Michael.
"Andrew Thompson" <SeeMySites@www.invalid> wrote in message
news:1u5r2k2bbv494$.fl6h7c2tngjz$.dlg@40tude.net...
> On Tue, 18 May 2004 18:23:57 GMT, Michael.R.Harris wrote:
>
> > An applet runs inside MS explorer.
>
> Many do. Got an URL for this one in particular?
>
> >.. It loads four images plus various other
> > buttons to initialize. Each time it is re-called inside the same
explorer
> > window new images are
> > loaded. All works well for the first two loads but subsequent loading
takes
> > longer and longer and partial images and errors appear.
>
> It sounds as though you might not be properly
> disposing of the graphics object, I *understand*
> (though am not sure) that can cause the symptom
> you describe.
>
> Check the GUI FAQ for a passing reference to it..
> <http://www.physci.org/guifaq.jsp#2.4>
>
> ..I am sure I have heard Thomas mention
> something more definitive than that.
>
> It would certainly be helpful to link to
> the applet web page annd source. Trim the
> source first, it may show you what you are
> doing wrong in any case. For tips..
> <http://www.physci.org/codes/sscce.jsp>
>
> You can put them up at Geocities for free.
> It took me about 30 mins to join and upload
> my first page the other night (I did it just
> to test the theory).
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology