On Sep 24, 2010, at 5:06 AM, Andreas Grosam wrote: > On Sep 23, 2010, at 3:50 AM, Jeff Johnson wrote: > >> Your object retains the timer, and the timer retains your object. That is >> obviously a kind of retain cycle. > I think, this kind of retain cycle is not a problem by itself when a > repeating timer is used.
I don't see how a repeating timer makes a difference. The memory management is the same. >> What can happen is that your app gets into a situation where the only thing >> that retains a reference to your object is its own theTimer ivar. > This can not happen that easily when a repeating timer is used, since there > must exist one other object holding a reference to the timer and invoking the > -invalidate message. The reference to the timer is most likely an ivar of > this other object, or the timer is indirectly retained by the other object > (say, as an element of NSArray). I think you misunderstood what I said. The "one other object" that you're talking about seems to be the same as "your object" that I was talking about. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com