• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimer never being deallocated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer never being deallocated


  • Subject: Re: NSTimer never being deallocated
  • From: Jeremy Pereira <email@hidden>
  • Date: Sun, 14 Mar 2010 11:09:43 +0000

On 13 Mar 2010, at 23:56, Tobias Jordan wrote:

> Hi Paul,
>
> You said 'an object you don't manage' -- If I alloc/init an instance of NSTimer I am responsible for this object, in my opinion.

Until you release it.  After that, you are not responsible for it.  That doesn't mean that something else hasn't taken over responsibility.


> That's why I tried to do everything properly.
> You see I am actually really just trying to prevent memory leaks and I see lots of leaks in sample code I am downloading somewhere. That's the reason I am so careful.
> Let's just close the topic here, I thank everyone for the explanations, I appreciate all of them!
>
> Best regards,
> Tobias Jordan.
>
> On Mar 13, 2010, at 9:53 PM, Paul Sanders wrote:
>
>> I don't understand all the confusion on this issue.  The NSTimer
>> documentation makes the life-cycle of this object very clear.
>> Until it goes away, it is probably retained by the runloop.
>>
>> As Joar says, you often can't make any concrete predictions
>> about when an object you don't manage yourself might be released
>> for the last time, but if you put a breakpoint on [NSTimer
>> dealloc] you will be able to see it when it happens.
>>
>> Paul Sanders.
>>
>>
>>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSTimer never being deallocated (From: Tobias Jordan <email@hidden>)
 >Re: NSTimer never being deallocated (From: Manfred Schwind <email@hidden>)
 >Re: NSTimer never being deallocated (From: Tobias Jordan <email@hidden>)
 >Re: NSTimer never being deallocated (From: Alexander Spohr <email@hidden>)
 >Re: NSTimer never being deallocated (From: Tobias Jordan <email@hidden>)
 >Re: NSTimer never being deallocated (From: Joar Wingfors <email@hidden>)
 >Re: NSTimer never being deallocated (From: Tobias Jordan <email@hidden>)
 >Re: NSTimer never being deallocated (From: "Paul Sanders" <email@hidden>)
 >Re: NSTimer never being deallocated (From: Tobias Jordan <email@hidden>)

  • Prev by Date: Cacheing optimisation in valueForKey:
  • Next by Date: Re: #include CommonStrings.txt - 'no such file' error
  • Previous by thread: Re: NSTimer never being deallocated
  • Next by thread: Re: NSTimer never being deallocated
  • Index(es):
    • Date
    • Thread