Re: NSTimer EXC_BAD_ACCESS
Re: NSTimer EXC_BAD_ACCESS
- Subject: Re: NSTimer EXC_BAD_ACCESS
- From: "Kyle Sluder" <email@hidden>
- Date: Sun, 14 Dec 2008 18:43:29 -0500
On Sun, Dec 14, 2008 at 2:52 PM, Jens Bauer <email@hidden> wrote:
> You probably experience your crash, because the timer is autoreleased. If
> you retain it, it'll live. However, you'll have to remember the timer
> object, so you can stop it later, so add NSTimer *timer; as a member
> variable of your class...
Take a look at the stack trace again. It's happening within the call
to +[NSTimer scheduledTimerWithInterval:target:selector:userInfo:repeats:].
The problem can't be that he hasn't retained a timer he hasn't
created yet.
--Kyle Sluder
_______________________________________________
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