Re: Zombies don't get enabled
Re: Zombies don't get enabled
- Subject: Re: Zombies don't get enabled
- From: "Sean McBride" <email@hidden>
- Date: Thu, 5 Jul 2007 14:23:52 -0400
- Organization: Rogue Research
On 7/5/07 7:49 PM, Giovanni Donelli said:
>Dear Folks, I am debugging my app that has some sporadic crashes. it
>sounded like a good idea to use Zombies to track the double release of an
>object.
>
>I look at different tutorials but I haven't figured out how to enable
>zombies in xcode...
>
>I pretty much followed what this tutorial said:
>http://www.mactech.com/articles/mactech/Vol.21/21.04/DebuggingBugs/index.html
>
>- I enabled NSZombieEnabled = YES, in the xcode's executable target, and
>also set CFZombieLevel = 5
Why 5?
>Still don't get Zombies exceptions when I run this:
>
>
>
>@implementation Controller
>
>
>- (void)awakeFromNib
>
>{
>
> NSLog(@"Zombies = %s", getenv("NSZombieEnabled") ); // I verified this
>is set to YES
>
> NSMutableString *string = [[NSMutableString alloc] initWithString:
>@"ciao"];
>
> [string release];
>
> NSMutableString *anotherString = [NSMutableString stringWithFormat:@"I'm
>new!"];
>
> NSLog(@"string = %@", string);
Being toll-free-bridged, NSZombie does not help with NSString. You need
CFZombie, and 5 is not the value you want. See:
<http://developer.apple.com/technotes/tn2004/tn2124.html#SECCF>
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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