Destroy method

From: Roedy Green (look-on_at_mindprod.com.invalid)
Date: 05/30/04

  • Next message: Stuart Leonard: "Re: Using a JList with a cell renderer within an applet/cell renderer not working"
    Date: Sun, 30 May 2004 01:11:53 GMT
    
    

    What happens if you don't write a Destroy method? Does everything in
    your Applet hang around forever?

    Do you properly need to write something like this to free the
    resources?

       public void destroy()
          {

          this.remove( colour );
          this.remove( download );
          this.remove( lineNumbers );
          this.remove( plainCanvas );
          prettyCanvasScroller.remove( prettyCanvas );
          this.remove( prettyCanvasScroller );
          colour = null;
          download = null;
          lineNumbers = null;
          plainCanvas = null;
          pretyCanvasScroller = null;
          prettyCanvas = null;
          }

    -- 
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming. 
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    

  • Next message: Stuart Leonard: "Re: Using a JList with a cell renderer within an applet/cell renderer not working"