Re: CLLocationManager-related crash in iOS 5
Re: CLLocationManager-related crash in iOS 5
- Subject: Re: CLLocationManager-related crash in iOS 5
- From: Rick Mann <email@hidden>
- Date: Fri, 14 Oct 2011 08:11:01 -0700
Oh, that's a good (and obvious) suggestion. Thanks!
--
Rick
On Oct 14, 2011, at 7:55 , Glenn L. Austin wrote:
> If you're autoreleasing the object when you're called back, you should reset the object's delegate (set it to nil) before autoreleasing it (and set your instance variable to nil, if you have one) -- or just keep the object around until -dealloc.
>
> On Oct 14, 2011, at 2:31 AM, Rick Mann wrote:
>
>> I figured out a little bit more. I make one request for location, then I call -stopUpdatingLocation and -autorelease the CLLocationManager from within the did-update callback.
>>
>> But in iOS 5, even after that, it still calls me back once more, at which time I'm -autoreleasing it a second time.
>>
>> Is this a bug?
>
> --
> Glenn L. Austin, Computer Wizard and Race Car Driver <><
> "Where there's breath, there's hope!"
> <http://www.austin-soft.com>
>
_______________________________________________
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