ARC запрещает явную отправку сообщения о проблеме «сохранения»

Я использую этот очень простой код из Apple Guide:

NSMutableData *receivedData;

// Create the request.
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/"]
                        cachePolicy:NSURLRequestUseProtocolCachePolicy
                    timeoutInterval:60.0];
// create the connection with the request
// and start loading the data
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
    // Create the NSMutableData to hold the received data.
    // receivedData is an instance variable declared elsewhere.
    receivedData = [[NSMutableData data] retain];
} else {
    // Inform the user that the connection failed.
}

Но для строки receivedData = [[NSMutableData data] retain];Xcode выдает ошибку:PushController.m:72:25: ARC forbids explicit message send of 'retain'

Как с этим бороться? Я использую Xcode 4.4.1

12
задан bryanmac 9 August 2012 в 05:00
поделиться