Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Applet Major Flaw

Reply
Thread Tools

Applet Major Flaw

 
 
Roedy Green
Guest
Posts: n/a
 
      10-01-2005
Something just hit me about Applets.

My partner leaves the browser running for weeks at a time.

Let's say during that time 200 Applets ran. All the statics are going
to be gradually piling up for class after class, gradually eating up
RAM and slowing the browser!

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
 
Mike Schilling
Guest
Posts: n/a
 
      10-01-2005

"Roedy Green" <(E-Mail Removed) > wrote in
message news:(E-Mail Removed)...
> Something just hit me about Applets.
>
> My partner leaves the browser running for weeks at a time.
>
> Let's say during that time 200 Applets ran. All the statics are going
> to be gradually piling up for class after class, gradually eating up
> RAM and slowing the browser!


Not necessarily. When an applet is destiryed, its classloader, and thus all
of its custom classes can be collected. What would build up is only the
system classes which have been loaded. Presumably this approaches a staedy
state.

Even if not, what would prevent a browser from creating a new JVM instance
every 50 applets or so?


 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-01-2005
On Sat, 01 Oct 2005 00:50:21 GMT, "Mike Schilling"
<(E-Mail Removed)> wrote or quoted :

> When an applet is destiryed, its classloader, and thus all
>of its custom classes can be collected.


I don't know how the Applet classloaders work. I do know that Applets
on the same page can communicate, especially instances of the same
Applet. That suggests all Applets on a page share a common
classloader.

My CurrCon applet informs all other copies of itself on page if the
user has changed his mind about the preferred currency. But that
information never leaks to instances running on other pages.

That implies each page has its own classloader. I suppose it would be
possible to compose some experiments to prove that.

On the other hand, everyone has noticed what a pain it is to debug
Applets. You can't get he ruddy browser to load a fresh copy of the
Applet without shutting it down and restarting. If it had a class
loader per page, it should be pretty trivial for the browser people to
give you a keystroke to kill the classloader for the page and start
afresh.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      10-01-2005
Roedy Green wrote:
...
> My CurrCon applet informs all other copies of itself on page if the
> user has changed his mind about the preferred currency. But that
> information never leaks to instances running on other pages.
>
> That implies each page has its own classloader.


No conclusions can be drawn from that, as I understand.
Whether the browser maker gives a new VM to applets in
different frames/pages is mostly up to them, and might
change from version to version.
 
Reply With Quote
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      10-01-2005
Roedy Green <(E-Mail Removed) > writes:

> I don't know how the Applet classloaders work. I do know that
> Applets on the same page can communicate, especially instances of
> the same Applet. That suggests all Applets on a page share a common
> classloader.


No, it suggests applets are registered in a common object possibly
provided by the system classloader, per Frame parent.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtle Bug Reveals Major Design Flaw rantingrickjohnson@gmail.com Ruby 2 12-25-2012 04:33 AM
DAMN! Found Major Flaw With New D3! Rita Berkowitz Digital Photography 40 01-03-2008 05:03 PM
Outlook TNEF flaw could be much worse than WMF flaw Au79 Computer Support 0 01-13-2006 10:48 PM
XPSP2 major flaw found Dave - Dave.net.nz NZ Computing 2 02-05-2005 05:49 AM
Major Major Problem With ASP.NET kokwooi ASP .Net 6 09-19-2003 08:52 AM



Advertisments