I was trying to have a pointer that pointed to another pointer that points to the instance of an object... such that:
Object *instancePtr = [[Object alloc] init];
Object **ptrToInstancePtr = &instancePtr;
Then I was trying to send a message like:
[*ptrToInstancePtr message];
But is seemed to just crash with a memory error of some sort. Should this work? Or was I going about it the wrong way? What I want is the pointer to the pointer so that if the object that 'instancePtr' points to changes, I don't need to update ptrToInstnacePtr.
Object *instancePtr = [[Object alloc] init];
Object **ptrToInstancePtr = &instancePtr;
Then I was trying to send a message like:
[*ptrToInstancePtr message];
But is seemed to just crash with a memory error of some sort. Should this work? Or was I going about it the wrong way? What I want is the pointer to the pointer so that if the object that 'instancePtr' points to changes, I don't need to update ptrToInstnacePtr.