Mark Easton wrote:
> var myobj:Object = new Object();
> delete myobj;
> 
> This returns the error: "Attempt to delete the fixed property myobj.  Only
> dynamically defined properties can be deleted."
> 
>  
> 
> Why is that? So how do I delete myobj when I want to create a new myobj
> instance?
> 

var o:Object = new Object(); //o is a fixed property of the current
                              // class

o.cheesecake = true; //cheesecake is a dynamically defined property

delete o.cheesecake; //can delete a dynamic property.

o = null;            //can set the fixed to null, garbage collector will
                      //clean up.

o = new Object();    // or can just create a new object and the old will 

                      //be cleanued up by gc.


HTH.

cheers,
  - shaun

Reply via email to