Just to be pedantically correct... In AS3 you can't destroy any object... only the garbage collector can. But by nulling the (only) var referring to your Podz instance, it becomes elegible for garbage collection at some point in the future. Setting the var to null is not the only way to release the reference to the Podz instance.. Setting it to refer to a second Podz instance would make the first instance eligible to be GCd. Or if the var was of type Object or *, you could set it to 17 or "abc", but null is the obvious convention. And if the var is a local variable, then that var automatically goes out of scope at the end of the function (not at the end of its block!) and the Podz instance becomes GC-eligible then. - Gordon
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of André Rodrigues Pena Sent: Wednesday, May 30, 2007 3:30 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Question about delete Olsen, var tmpPod:Podz; you have already created a pointer. But in order to destroy it, you set it as null. On 5/30/07, Alex Harui < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: No pointers in AS3, just references. As soon as you set tmpPod=null, the instance of Podz is eligible for garbage collection. ________________________________ From: flexcoders@yahoogroups.com [mailto: flexcoders@ <mailto:flexcoders@> yahoogroups.com <http://yahoogroups.com> ] On Behalf Of Christopher Olsen Sent: Wednesday, May 30, 2007 11:02 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about delete Hello, Quick question.. The following doesn't work says it must be dynamically defined... how do we make something a pointer? var tmpPod:Podz = new Podz(); delete(tmpPod); -- André Rodrigues Pena LOCUS www.locus.com.br <http://www.locus.com.br> Blog www.techbreak.org <http://www.techbreak.org>