1

I'm having trouble with release, as I read is because I'm using Xcode 4.2. I tried the option: "Convert to Objective-C ARC" but it still fails:

Xcode found 6 issues that prevent conversion from proceeding. Fix all ARC readiness issues and try again.

receivedData = [[NSMutableData data] retain];

ARC forbids explicit message send of 'retain'

and:

[receivedData release];

"release is unavailable"

Community
  • 1
  • 1
user1256477
  • 10,763
  • 7
  • 38
  • 62
  • 1
    Possible duplicate of [Xcode ARC (automatic reference counting), "release is unavailable"](https://stackoverflow.com/questions/8236797/xcode-arc-automatic-reference-counting-release-is-unavailable) – Cœur Jul 17 '18 at 18:08

1 Answers1

2

You would just use:

receivedData = [NSMutableData data];
// or
receivedData = [[NSMutableData alloc] init];

because the reference count operation under ARC is automatic.

justin
  • 104,054
  • 14
  • 179
  • 226