• 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: Unable to disassemble objc_assign_strongCast
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to disassemble objc_assign_strongCast


  • Subject: Re: Unable to disassemble objc_assign_strongCast
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Mon, 2 Nov 2009 23:43:46 -0600

On Mon, Nov 2, 2009 at 9:47 PM, Leonardo Borsten
<email@hidden> wrote:
>        NSError **saveError;
>        [importContext save:saveError];  // <--- crashes here

Think for a minute about what the parameter is trying to do: return an
object. To do that it needs to assign to a variable the caller
provides. Is that what you're doing? No. You're passing the function a
junk address (whatever happens to be on the stack when space for
saveError is reserved). Here's the normal way to do it:

NSError *saveError;
[importContext save:&saveError];
_______________________________________________

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

  • Follow-Ups:
    • Re: Unable to disassemble objc_assign_strongCast
      • From: Bryan Henry <email@hidden>
References: 
 >Unable to disassemble objc_assign_strongCast (From: Leonardo Borsten <email@hidden>)

  • Prev by Date: Re: Commandline Tool Help - NSDistantObject and NSConnection
  • Next by Date: Re: Unable to disassemble objc_assign_strongCast
  • Previous by thread: Unable to disassemble objc_assign_strongCast
  • Next by thread: Re: Unable to disassemble objc_assign_strongCast
  • Index(es):
    • Date
    • Thread