title: How to release memory of child view controllers
body: <p>I have a page view controller in which i have four view controller.My question is when i go to second view controller i need to release memory of first,third and fourth view controller similarly for other three view controller.How to find whether it is allocating or deallocating memory for view controllers using instruments.I have tried using dealloc but the method is not getting called and i am using arc.I have my code as follows</p>
  
  <pre><code>-(NewsViewController *)news
  
  {
  
  if (!news) {
  
  UIStoryboard *storyboard = self.storyboard;
  news = [storyboard instantiateViewControllerWithIdentifier:@"News"];
  }
  
  return news;
  
  }
  
  -(PriceViewController *)price 
  {
  
    if (!price) {
  
      UIStoryboard *storyboard = self.storyboard;
      price = [storyboard instantiateViewControllerWithIdentifier:@"price"];
  
    }
  return price;
  
  }
  
  - (CommentryViewController *)commentry {
  
  if (!commentry) {
      UIStoryboard *storyboard = self.storyboard;
      commentry = [storyboard instantiateViewControllerWithIdentifier:@"commentry"];
  }
  
  return commentry;
  }
  
  -(WatchlistViewController *)watchlist {
  
  if (!watchlist) {
      UIStoryboard *storyboard = self.storyboard;
      watchlist = [storyboard instantiateViewControllerWithIdentifier:@"watchlist"];
  }
  
  return watchlist;
  }
  
  
  - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController {
  
  UIViewController *nextViewController = nil;
  
  if (viewController == self.news) {
      nextViewController = self.commentry;
  
  
  }
  else if(viewController == self.commentry) {
              titleView.text = @"Commentry";
      [titleView sizeToFit];
  
      //self.title=@"Commentry";
      nextViewController = self.price;
  
  }
  else if(viewController == self.price) {
  
      titleView.text = @"Price";
      [titleView sizeToFit];
      nextViewController = self.watchlist;
  
  
  }
  else if(viewController == self.watchlist) {
      titleView.text = @"WatchList";
      [titleView sizeToFit];
  
  }
  
  return nextViewController;
  }
  
  - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController {
  
  UIViewController *prevViewController = nil;
  
  if (viewController==self.watchlist) {
      titleView.text = @"WatchList";
      prevViewController = self.price;
  
  
  }
  else if (viewController == self.price) {
          titleView.text = @"Price";
      prevViewController = self.commentry;
         }
  else if (viewController == self.commentry) {
      titleView.text = @"Commentry";
      prevViewController = self.news;
  
  
  }
  else if(viewController == self.news) {
  
      titleView.text = @"News";
  }
  
  return prevViewController;
  }
  </code></pre>