• 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: NSNetService getInputStream:outputStream: and ARC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNetService getInputStream:outputStream: and ARC


  • Subject: Re: NSNetService getInputStream:outputStream: and ARC
  • From: Martin Linklater <email@hidden>
  • Date: Thu, 08 Dec 2011 22:44:04 +0000

Thanks Ken - that did the trick.

On 8 Dec 2011, at 22:17, Ken Thomases wrote:

> On Dec 8, 2011, at 4:11 PM, Martin Linklater wrote:
>
>> Hi - I'm writing some OSX NSNetService code with ARC enabled, and I'm getting the following compile error with the following code:
>>
>> @property(strong) NSInputStream* inputStream;
>> @property(strong) NSOutputStream* outputStream;
>>
>> - (void)netServiceDidResolveAddress:(NSNetService *)sender
>> {
>> 	[sender getInputStream:&_inputStream outputStream:&_outputStream]; <===ERROR
>> }
>>
>> The error is:
>>
>> 'Passing address of non-local object to __autoreleasing parameter for write-back'
>>
>> I'm a bit stumped as to what I need to do to get this compiling... can anyone help at all ?
>
> Create two local variables, pass the addresses of them to the the method, then assign their values to the ivars after it returns.
>
> Cheers,
> Ken
>

_______________________________________________

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

References: 
 >NSNetService getInputStream:outputStream: and ARC (From: Martin Linklater <email@hidden>)
 >Re: NSNetService getInputStream:outputStream: and ARC (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: NSNetService getInputStream:outputStream: and ARC
  • Next by Date: Strange behivor when our document-based Cocoa application launch on lion
  • Previous by thread: Re: NSNetService getInputStream:outputStream: and ARC
  • Next by thread: Strange behivor when our document-based Cocoa application launch on lion
  • Index(es):
    • Date
    • Thread