Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Applet.destroy()

Thread view: 
Ike - 28 Feb 2006 15:48 GMT
If someone just closes a browser instance, which is running an Applet, is

public void destroy()

invoked in all cases (i.e. for all OS's, all broswers?) -Ike
Vova Reznik - 28 Feb 2006 15:54 GMT
> If someone just closes a browser instance, which is running an Applet, is
>
> public void destroy()
>
> invoked in all cases (i.e. for all OS's, all broswers?) -Ike

As javadoc says:
"Called by the browser or applet viewer to inform this applet that it is
being reclaimed and that it should destroy any resources that it has
allocated. The stop method will always be called before destroy.

A subclass of Applet should override this method if it has any operation
that it wants to perform before it is destroyed. For example, an applet
with threads would use the init method to create the threads and the
destroy method to kill them.

The implementation of this method provided by the Applet class does
nothing. "
Chris Uppal - 28 Feb 2006 16:33 GMT
> If someone just closes a browser instance, which is running an Applet, is
> public void destroy()
> invoked in all cases (i.e. for all OS's, all broswers?) -Ike

I doubt it.  Why should it ?  Indeed, how can it ?  If the browser is being
killed, it doesn't necessarily get any choice in the matter nor any chance to
clean up (even if it wanted to).

Consider what happens if someone turns the computer off ;-)

   -- chris
Oliver Wong - 28 Feb 2006 20:36 GMT
>> If someone just closes a browser instance, which is running an Applet, is
>> public void destroy()
[quoted text clipped - 7 lines]
>
> Consider what happens if someone turns the computer off ;-)

   When asking yourself "for all OS's, all browser?" type of questions,
consider that someone may, immediately after reading your newsgroup post,
maliciously decide to specifically write a browser or OS combination which
does not satisfy your requirements; then ask yourself what that means for
your application design. In some cases, you won't care about such rogue
browser/OS combinations. But in other cases (e.g. the security of your
application server depends on certain behaviour), you will care very much.

   - Oliver
Chris Uppal - 28 Feb 2006 21:08 GMT
>     When asking yourself "for all OS's, all browser?" type of questions,
> consider that someone may, immediately after reading your newsgroup post,
> maliciously decide to specifically write a browser or OS combination which
> does not satisfy your requirements; then ask yourself what that means for
> your application design.

Nicely put.

   -- chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.