I wasn't quite thinking that way, but in theory, if you put a weak
reference listener on a timer to a method in the object and had it trace
out, it would stop tracing after it got collected.  You won't know the
moment it got collected, but just that it went away at some point.

 

I was thinking you'd put the object in a Dictionary with weak references
and on a timer, scan the dictionary to see if it is still there or not.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of arieljake
Sent: Friday, September 14, 2007 5:55 PM
To: [email protected]
Subject: [flexcoders] Re: checking if an object is being garbage
collected

 

are you saying that if i start a timer inside of a class that i expect
to be garbage collected, that even if the timer still has intervals
left to repeat, the object will still get cleaned up and the timer
with it?

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Essentially, no. You can use timers to see if it still around, but
> that's not really a good thing to do.
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Ariel Jakobovits
> Sent: Friday, September 14, 2007 3:34 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] checking if an object is being garbage collected
> 
> 
> 
> Is there a way to monitor if an object (a Cairngorm Command in this
> case) is being garbage collected?
>

 

Reply via email to