FROM : Nathan Day
DATE : Thu Jan 09 20:01:03 2003
Yes, NSRunLoop also retains it, but like all object reference counting
you should not rely on that. You could probable get away with not
retaining a repeating NSTimer if all you want to do is invalidate it
since presumable the NSRunLoop will not release it until it has been
invalidated, but I would assume this to be true. It most likely would
not be safe to not retain a non-repeating NSTimer that you want to
invalidate sometime.
On Friday, January 10, 2003, at 07:22 AM, Finlay Dobbie wrote:
> I was a bit puzzled by this too. I think what you should do is retain
> it after you create it, then later invalidate it and release it. Is
> that right?
>
Nathan Day
http://homepage.mac.com/nathan_day/
DATE : Thu Jan 09 20:01:03 2003
Yes, NSRunLoop also retains it, but like all object reference counting
you should not rely on that. You could probable get away with not
retaining a repeating NSTimer if all you want to do is invalidate it
since presumable the NSRunLoop will not release it until it has been
invalidated, but I would assume this to be true. It most likely would
not be safe to not retain a non-repeating NSTimer that you want to
invalidate sometime.
On Friday, January 10, 2003, at 07:22 AM, Finlay Dobbie wrote:
> I was a bit puzzled by this too. I think what you should do is retain
> it after you create it, then later invalidate it and release it. Is
> that right?
>
Nathan Day
http://homepage.mac.com/nathan_day/
| Related mails | Author | Date |
|---|---|---|
| Ken Wieschhoff | Jan 9, 12:40 | |
| Finlay Dobbie | Jan 9, 12:55 | |
| Mark T | Jan 9, 12:58 | |
| Jonathan Johnson | Jan 9, 13:01 | |
| Tobias Peciva | Jan 9, 13:16 | |
| Nathan Day | Jan 9, 20:01 |






Cocoa mail archive

