In Objective-C I saw two common patterns for passing objects to functions. Basically all objects to functions are passed by reference like this:
-(void) someFunc:(UIImage*)image;
this is pass by reference, isn't it?
But then what is this:
-(void) someFunc2:(UIImage**)image
?? Is it also passing by reference? Or passing by pointer to pointer? Or what? I don't understand what is an actual difference (but I saw this code a lot). And the main question: why do we need this pointer to pointer passing : -(void) someFunc2:(UIImage**)image
? Thanks.