मैं एआरसी के लिए मेरे सॉकेट ग्राहक परिवर्तित कर रहा हूँ "लिखने-वापस लिए __autoreleasing पैरामीटर के लिए गैर स्थानीय वस्तु का पता पासिंग":त्रुटि
- (id)initWithHostname:(NSString *)hostname AndPort:(NSInteger)port
{
if((self = [super init]))
{
oBuffer = [[NSMutableData alloc] init];
iBuffer = [[NSMutableData alloc] init];
iStream = [[NSInputStream alloc] init];
oStream = [[NSOutputStream alloc] init];
[NSStream getStreamsToHost:[NSHost hostWithName:hostname] port:port inputStream:&iStream outputStream:&oStream];
...
}
return self;
}
त्रुटि मुझे मिल गया है:
file://localhost/...foo.m: error: Automatic Reference Counting Issue: Passing address of non-local object to __autoreleasing parameter for write-back
पर "& iStream"/"& oStream"
[NSStream getStreamsToHost:[NSHost hostWithName:hostname] port:port inputStream:&iStream outputStream:&oStream];
किसी भी मदद की इस लाइन पर?
को देखते हुए कैसे नए एआरसी है, तो आप डेवलपर मंचों पर इस पूछने के लिए बेहतर कर सकता है के रूप में घोषित किया जाना चाहिए । – jtbandes
निश्चित रूप से, निश्चित रूप से;) – kilianc