Ben ARC benim soket istemci dönüştürme ediyorum "geri yazımı için __autoreleasing parametreye yerel olmayan nesnenin adresini Geçme":hata
- (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;
}
i got hatadır:
file://localhost/...foo.m: error: Automatic Reference Counting Issue: Passing address of non-local object to __autoreleasing parameter for write-back
/"& oStream" "& iStream"
[NSStream getStreamsToHost:[NSHost hostWithName:hostname] port:port inputStream:&iStream outputStream:&oStream];
Herhangi bir yardım bu çizgisinde?
ARC, geliştirici forumlarında bu sormak daha iyi yapabilir ne kadar yeni Verilen .m dosyanın aynı olarak ilan edilmesi gerektiğini Not . – jtbandes
Elbette, elbette;) – kilianc