warning: unverified
For the argument, let's start with:
typedef NSError * NSErrorPtr ; - (void) foo: (NSErrorPtr *) errPtr { *errorPtr = [NSError new] ; }
errPtr is not declared by __weak or __strong.
So, according to ARC, although its contents are allocated within foo , the responsibility for releasing it must be somewhere.
Where?
Note that this is not a property of double pointers as such. But your distribution pattern.
consider the following issues:
int ** arrayOfarrayOfInts = { {1, 2, 3, 4} , {5, 6, 7, 8} } ; - (void) incrementElement: (int **) elem { ++(**elem) ; } - (void) bumpFirstColByOne { for (int i = 0 ; i < 2 ; ++ i) { int * arrayOfInt = arrayOfarrayOfInts[i] ; int ** second = &arrayOfInt[0] ; [self incrementElement: second] ; } }
There is no need for __autoreleasing because distribution does not occur ...
verec
source share