Your data pointer is an unsafe_unretained
property,
@property (nonatomic, unsafe_unretained) NSMutableData* wpData;
and you are assigning it a autoreleased instance,
self.wpData = [NSMutableData data]; //Returns autoreleased object
Since you are making asynchronous download request you require to maintain the data object.
You never know when the autorelease pool will be flushed and the unretained object will go out of scope. In such situations you should retain
the autoreleased object. Change the property to strong
and allocate the data object,
@property (nonatomic, strong) NSMutableData* wpData;
//...
self.wpData = [[NSMutableData alloc] init]; //Better practice
Hope that helps!