title: Why does this applet have a destroy method?
body: <p>I've been trying to learn about applets by studying the code for the <a href="http://java.sun.com/j2se/1.4.2/docs/guide/misc/applet.html" rel="nofollow noreferrer">"Welcome to HotJava"</a> applet. I decompiled the *.class file using the Windows version of <a href="http://www.kpdus.com/jad.html" rel="nofollow noreferrer">Jad</a>, and I see the following lines of code</p>
  
  <pre><code>public void init() {
      // Skip some lines...
      addMouseListener(this);
  }
  
  public void destroy()
  {
      removeMouseListener(this);
  }
  </code></pre>
  
  <p>Is the destroy method really necessary here? Why does the applet need to remove itself as a mouse listener if it's just about to end?</p>