I have a class RemoteImageLoader which has a method loadImage:
- (void) loadImage: (NSString*) url setTarget:(NSData **)target;
I used a NSData** here because I need to indirectly return NSData* , just like some typical method:
- (BOOL)save:(NSError**)
since the method will actually invoke another asynchronous method, I have to save the target as a member variable so I can access it later. but when I define a NSData ** member variable:
@interface RemoteImageLoader : NSObject
@property NSData** target;
@end
the compiler complains that "Pointer to non-const type 'NSData*' with no explicit ownership". I've done some search on google, but find no answer of it. Could anyone help me with this? Thanks a lot
and I've tried to replace the declaration to
@interface RemoteImageLoader : NSObject
@property NSData * __autoreleasing * target;
@end
but the problem still exists