• 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
Arc and **
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Arc and **


  • Subject: Arc and **
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 05 Dec 2012 11:56:40 +0700

I have (using Arc) a method which works fine:
NSString *explanation;
[ self doSomeThingAndExplain: &explanation ];

Now I decided that sometimes I don't need this explanation. So I changed it to:

NSString **explanatioP = urgent ? NULL : &explanation; // <-- "no explicit ownership...
[ self doSomeThingAndExplain: explanatioP];	//	passing address of non-local object...

But now the compiler gets really upset (errors written as comments above).

What Arc-magic is needed to get this to compile?

Gerriet.



_______________________________________________

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: Arc and **
      • From: Greg Parker <email@hidden>
    • Re: Arc and **
      • From: Roland King <email@hidden>
  • Prev by Date: Re: NSOperation Efficiency
  • Next by Date: Re: Arc and **
  • Previous by thread: Document Types, imported and exported uti's
  • Next by thread: Re: Arc and **
  • Index(es):
    • Date
    • Thread