title: Where did these lines of code memory leak in this ARC code?
body: <pre><code>[client enqueueBatchOfHTTPRequestOperations:@[profileOperation,commFriendsOperation] progressBlock:^(NSUInteger finished, NSUInteger total){} completionBlock:^(NSArray *completedRequests){
  //Code here
  }]
  </code></pre>
  
  <p>The Code below are in an AFNetworking batch request success block. The instruments shows that codes blow have memory leak as it commented. However, I cannot figure out how did it leaked and how can I fix it, anybody has any idea?</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>AFHTTPRequestOperation *commFriendsRequest = [completedRequests objectAtIndex:1];
      if(!commFriendsRequest.error&amp;&amp;commFriendsRequest.responseData){
          //Leak 46.2%
          NSDictionary *commDic = [NSJSONSerialization JSONObjectWithData:commFriendsRequest.responseData options:NSJSONReadingMutableContainers error:NULL];
          int status1 = [[commDic objectForKey:@"status"]intValue];
          if(status1 == kSuccessCode){
              NSArray *commFriendsArray = [commDic objectForKey:@"data"];
              if(commFriendsArray&amp;&amp;commFriendsArray.count){
                  //Leak 30.8%
                  NSMutableArray *userItems = [NSMutableArray arrayWithCapacity:commFriendsArray.count];
                  for(NSDictionary *dic in commFriendsArray){
                      //Leak 23.1%
                      userItem *item = [[userItem alloc]initFromServer:dic];
                      [userItems addObject:item];
                  }
                  if(profile){//Both Success
                      profile.commonFriends = userItems;
                      successBlock(profile);//block call back
                  }else{
                      if(status0==kSuccessCode){
                          successBlock(userItems);//block call back
                      }else{
                          NSError *error = [NSError errorWithDomain:kErrorDomain code:status0 userInfo:nil];
                          failedBlock(error);//block call back
                      }
                  }
              }else if(status0==kSuccessCode){//CommFriends 0 has profile
                  successBlock(profile);//block call back
              }
          }else{
              if(status0==kSuccessCode){//CommFriends failed has profile
                  successBlock(profile);//block call back
              }else{//Both failed
                  NSError *error = [NSError errorWithDomain:kErrorDomain code:status1 userInfo:nil];
                  failedBlock(error);//block call back
              }
          }
      }else{
          failedBlock(commFriendsRequest.error);
      }
  
  
  //[[userItem alloc] initFromServer:dict] code
  -(id)initFromServer:(NSDictionary *)dict{
  if ((self = [super init])) {
      NSString *_userID = [dict objectForKey:@"userID"];
      NSString *_userName = [dict objectForKey:@"userName"];
      genderType _userGender = [[dict objectForKey:@"userGender"] integerValue];
      NSString *_userHeadImageURL = [dict objectForKey:@"userHeadImageURL"];
      NSString *_source = [dict objectForKey:@"source"];
      int _likeCount = [[dict objectForKey:@"likedCount"] intValue];
      int _sameFriends = [[dict objectForKey:@"sameFriends"] intValue];
      NSString *_homePage = [dict objectForKey:@"homePage"];
  
      NSString *_createTime = [dict objectForKey:@"createTime"];
      if([dict objectForKey:@"dis"])
          _distance = [[dict objectForKey:@"dis"]floatValue];
      else
          _distance = 0;
  
      if ([dict objectForKey:@"uid"]) {
          self.uid = [[dict objectForKey:@"uid"] intValue];
      }
      else{
          self.uid = -1;
      }
  
      self.userID = _userID;
      self.userName = _userName;
      self.userGender = _userGender;
      self.userHeadImageURL = _userHeadImageURL;
      self.source = _source;
      self.likeCount = _likeCount;
      self.sameFriends = _sameFriends;
      if (_homePage &amp;&amp; ![_homePage isKindOfClass:[NSNull class]]) {
          self.homePage = _homePage;
      }
  
      if([dict objectForKey:@"hasJoin"]){
          self.hasJoined = [[dict objectForKey:@"hasJoin"]boolValue];
      }
  
      if (_createTime &amp;&amp; ![_createTime isKindOfClass:[NSNull class]]) {
          NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
          [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss z"];
          self.createTime = [dateFormatter dateFromString:_createTime];
      }
  
      NSString *c = [dict objectForKey:@"comment"];
      if (c &amp;&amp; ![c isKindOfClass:[NSNull class]]) {
          self.comment = c;
      }
  }
  return self;
  </code></pre>
  
  <p>}</p>