Re: newbie EXC_BAD_ACCESS
Re: newbie EXC_BAD_ACCESS
- Subject: Re: newbie EXC_BAD_ACCESS
- From: Larry Fransson <email@hidden>
- Date: Sun, 20 Mar 2005 17:54:16 -0800
On Mar 20, 2005, at 3:17 PM, Daniel Child wrote:
[scanner scanUpToCharactersFromSet: chSetTab intoString: &scannedName];
This line is going to cause a problem. You have declared scannedName,
but it hasn't been allocated or initialized, so it's pointing nowhere.
That will cause a crash.
This would be a good place for an autoreleased object. When you
declare scannedName, initialize it using [NSString string]. Then you
don't need to worry about cleaning it up afterward.
Larry Fransson
Seattle, WA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden