I'd say if A is long-lived you'd definitely want to keep a reference to the watcher so you can unwatch it, or at least re-use it :)
Just thinking of the best way to have an editor component have the VO injected but still be able to know when the entire object is replaced behind its back. I think I'll go with an "I've been replaced" event :) -Josh On Thu, Aug 21, 2008 at 7:42 AM, yigit <[EMAIL PROTECTED]> wrote: > When u create a binding from object A to B, a reference is added to A. > (A keeps a reference to B). > It will not be garbage collected until you unwatch the changeWatcher it > or delete A. > > So if your concern is whether u need to keep a reference to > ChangeWatcher object returned by > > mx.binding.utils > < > http://livedocs.adobe.com/flex/2/langref/mx/binding/utils/package-detail.html > >. > bindSetter > < > http://livedocs.adobe.com/flex/2/langref/mx/binding/utils/BindingUtils.html#bindSetter%28%29 > > > , the answer is no, you dont need to keep a reference to CW. > > yigit > > Alex Harui wrote: > > > > I think you have to call unwatch otherwise the CW may not get GC'd > > > > ------------------------------------------------------------------------ > > > > *From:* [email protected] [mailto:[EMAIL PROTECTED] > > *On Behalf Of *Josh McDonald > > *Sent:* Tuesday, August 19, 2008 10:57 PM > > *To:* [email protected] > > *Subject:* [flexcoders] Question about binding via AS > > > > Hey guys, > > > > If you create a binding via AS, will the binding "stop" when the > > returned ChangeWatcher instance is garbage collected? If not, is > > ChangeWatcher sort of a "pointer" to some player-internal stuff, or is > > there a strong reference to the ChangeWatcher via the event binding to > > PropertyChange on the host? > > > > -Josh > > > > -- > > "Therefore, send not to know For whom the bell tolls. It tolls for thee." > > > > :: Josh 'G-Funk' McDonald > > :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > > > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]

