Hi Boon,

Good luck with learning bytecode.

However, I suspect that the reason your first delete statement doesn't
work is because of the way flash's garbage collection works. When you
call delete on an object, it is marked for deletion by the garbage
collector. It uses reference counting to decide whether to actually
delete something, so I suspect that if you try to delete an object
from within itself, it most likely will not actually do so, until that
object has finished up. I'd say you should probably always try to
delete objects from outside of their own scope.

It's likely that if this is indeed the case, the problem will look
exactly the same at the bytecode level.

Hope this sheds some light on your problem,
Alias
On 12/3/05, Boon Chew <[EMAIL PROTECTED]> wrote:
>
> Is there any tools or documentation out there that
> will aid in learning actionscript bytecode?
>
> I ran into this the other day, and it seems like only
> reading the bytecode can help me understand why it
> doesn't work?
>
> class A
> {
>    function destroy()
>    {
>       delete this;  // doesn't delete itself
>    }
> }
>
> var a = new A();
> delete a;  // delete works here
>
> - boon
>
>
>
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to