RE: [flexcoders] When not to use weak references?

2008-07-15 Thread Alex Harui
To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] When not to use weak references? Now that I've been corrected on what the weak listeners *actually* do, I definitely agree on using weak references against long-life objects when possible =) -Josh On Tue, Jul 15, 2008 at 3:17 PM, Tim Rowe [EMAIL

RE: [flexcoders] When not to use weak references?

2008-07-15 Thread Rick Winscot
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Rowe Sent: Tuesday, July 15, 2008 1:17 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] When not to use weak references? Strong references don't cause memory leaks, bad coding and lack of understanding

RE: [flexcoders] When not to use weak references?

2008-07-15 Thread Boon Chew
] wrote: From: Rick Winscot [EMAIL PROTECTED] Subject: RE: [flexcoders] When not to use weak references? To: flexcoders@yahoogroups.com Date: Tuesday, July 15, 2008, 6:22 AM Tim – actually strong references _can_cause memory leaks… would you consider either

[flexcoders] When not to use weak references?

2008-07-14 Thread Boon Chew
Hi all, I have read posts that preached the goodness of weak references for event listening, but have not read anything that suggests when you should use strong reference over the weak one, and  the down side to using weak references. Any ideas when being weak is not bad thing? :) - boon

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Josh McDonald
That's a really good question, and one I'd very much like to know the answer to as well :) On Tue, Jul 15, 2008 at 2:08 PM, Boon Chew [EMAIL PROTECTED] wrote: Hi all, I have read posts that preached the goodness of weak references for event listening, but have not read anything that

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Daniel Gold
I've hit a few places in the past and will attempt to drudge them up, but no warranties here. How about a case where you create a timer as a local variable in a function and add a weak listener. Since there are no strong references to the Timer I beilieve it is eligible for garbage colleciton,

RE: [flexcoders] When not to use weak references?

2008-07-14 Thread Tim Rowe
and there. --Tim Rowe From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Boon Chew Sent: Tuesday, 15 July 2008 2:08 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] When not to use weak references? Hi all, I have read posts

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Josh McDonald
and there. --Tim Rowe -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Boon Chew *Sent:* Tuesday, 15 July 2008 2:08 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] When not to use weak references? Hi all, I have read posts

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Douglas McCarroll
PROTECTED] *On Behalf Of *Boon Chew *Sent:* Tuesday, 15 July 2008 2:08 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] When not to use weak references? Hi all, I have read posts that preached the goodness of weak references for event listening, but have not read anything

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Daniel Gold
:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Boon Chew *Sent:* Tuesday, 15 July 2008 2:08 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] When not to use weak references? Hi all, I have read posts that preached the goodness of weak references for event

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Josh McDonald
Dammit, I think I had the wrong end of the stick WRT weak listeners. I thought it was so keeping the listener alive didn't keep the listened object alive, rather than the other way around. My bad - I hate when that happens. Hope I didn't give anybody bad advice! :) -Josh On Tue, Jul 15, 2008 at

RE: [flexcoders] When not to use weak references?

2008-07-14 Thread Tim Rowe
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Gold Sent: Tuesday, 15 July 2008 2:58 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] When not to use weak references? I would agree that's not a best practice for writing timer code, just the quickest

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Josh McDonald
Now that I've been corrected on what the weak listeners *actually* do, I definitely agree on using weak references against long-life objects when possible =) -Josh On Tue, Jul 15, 2008 at 3:17 PM, Tim Rowe [EMAIL PROTECTED] wrote: Strong references don't cause memory leaks, bad coding and