写个单例就解决了
//解决AFNetworking内存泄漏
+(AFHTTPSessionManager *)sharedHTTPSession{
static dispatch_once_t onceToken;
dispatch_once(& onceToken, ^{
manager = [AFHTTPSessionManager manager];
});
return manager;
}
写个单例就解决了
//解决AFNetworking内存泄漏
+(AFHTTPSessionManager *)sharedHTTPSession{
static dispatch_once_t onceToken;
dispatch_once(& onceToken, ^{
manager = [AFHTTPSessionManager manager];
});
return manager;
}