• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • /usr/X11R6/bin?
      • From: Todd Blanchard <email@hidden>
    • Re: newbie EXC_BAD_ACCESS
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: newbie EXC_BAD_ACCESS (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: Faking large arrays in bindings to satisfy sparse data...
  • Next by Date: Re: newbie EXC_BAD_ACCESS
  • Previous by thread: Re: newbie EXC_BAD_ACCESS
  • Next by thread: Re: newbie EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread