objective-cmemory-managementautomatic-ref-counting

ARC: "Pointer to non-const type 'id' with no explicit ownership"


I am upgrading an iOS 4 project to use ARC with the sdk5. So I want to use the automatic refactor method for converting the code to use ARC.

Unfortunately, it doesn´t work.

for(id* child in childObjectArray){
    [child removeParentGroupReferences];
}

I get a lot of errors including

Pointer to non-const type 'id' with no explicit ownership


Solution

  • Change id* to id. id is already defined as an object pointer.