I see, just for some info, the compiler won't allow the watching of getter
and setter functions. It should yield less overhead than any alternative,
such as observer/listener patterns with ASBroadcast, otherwise I don't see
the purpose in having it at all. I'm not sure about the garbage collection,
but based on the functions they provide for you, I would assume that the
Object class has an internal watch list that would be removed with the
removal of the object, so if you're deleting the object then I don't think
you should call unwatch before doing so, otherwise, I think there is as much
a reason for the unwatch function for managing the object as is to
controlling its watch refrences, as this is the only thing that should
pertain to overhead.

I mean, if you remove a property in a dynamic object class, then you should
probably remove it with a wrapper function, passing the property name as an
argument, the idea is to unwatch it if it's being watched before deleting
it. I would guess that this is most optimal, unless however an object does
this before removing a property of itself anyways. I don't know the answer
to this question.

I hope this helps,

M.

On 3/21/06, Julien Vignali <[EMAIL PROTECTED]> wrote:
>
> Hi list,
> I am playing around with the Object.watch() function in my custom UI
> components classes... I wanted to know if having 8-10 watches in a class
> would create some CPU overhead, or does it just work like an internal
> classic Delegate (which also requires an unwatch() upon object
> deletion)? Note that I don't watch get and set functions, just simple
> private members of the class...
>
> Thanks for the reply,
>
> Julien
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to