Re: memory management issue?
Re: memory management issue?
- Subject: Re: memory management issue?
- From: Michael Watson <email@hidden>
- Date: Fri, 1 Feb 2008 16:15:58 -0500
Have you read the Cocoa memory management guide? It covers accessors:
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//apple_ref/doc/uid/TP40003539
>
--
m-s
On 01 Feb, 2008, at 14:33, Steven Crosley wrote:
Looks like it was an issue with the setAddressBook function. Works
like a charm now, and I think I more fully understand how memory
management works. Thanks again for all your help!
Before suggestions:
- (void)setAddressBook
{
book = [ABAddressBook sharedAddressBook];
person = (ABPerson *)[book recordForUniqueId:[self uid]];
}
After suggestions:
- (void)setAddressBook
{
[book release];
[person release];
book = [[ABAddressBook sharedAddressBook] retain];
person = (ABPerson *)[[book recordForUniqueId:[self uid]] retain];
}
On Feb 1, 2008, at 12:51 PM, j o a r wrote:
On Feb 1, 2008, at 10:29 AM, Steven Crosley wrote:
[NSCFString valueForProperty:]: unrecognized selector sent to
instance 0x1b90e0
Sounds like a message sent to a deallocated object, something that
using NSZombieEnabled would help you troubleshoot. Give it a try!
j o a r
_______________________________________________
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:
@bungie.org
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