Reputation:
I have some strange problem,my code is
NSLog(@"A:%@",a);
b=[NSString stringWithFormat:@"1800-%@",a];
NSLog(@"B:%@",b);
The output is,
A:5555555
B:Safari free
I dont know what the problem is?
Upvotes: 0
Views: 136
Reputation: 8513
Could be memory overwrites/over releasing, try running with NSZombieEnabled set in the environment (edit the environment in Xcode executable settings) or enable GuardMalloc (in the run menu).
Instruments now has a zombie tool too.
Upvotes: 0
Reputation: 15115
I have once encountered this kind of problem. The mistake i did was, i assigned IBOutlet to NSString
IBOutlet NSString *string;
You may also assign IBOutlet to that NSString, please check, if so remove that.
Upvotes: 3