title: How to solve fails which are not reported in console
body: <p>Maybe it is silly question, but I have an curious problem. My app fails every time I try to refresh my data in database using core data when I re-enter the view controller. If I enter the view controller and refresh data from internet it works. However, when I start the program, enter the view controller, then pop it and re-enter and try refresh data, it fails and nothing is logged in view controller. I do not know why it happens. So I tried to debug it but the problem disappeared. After I tried again without debug mode it failed once more. I do not know why. Could it be problem of allocation, or something not released? Here's my implementation of <code>-viewDidLoad</code>:</p>
  
  <pre><code>- (void)viewDidLoad {
      pool = [[NSAutoreleasePool alloc] init];
  
      if (managedObjectContext_ == nil) 
      { 
          managedObjectContext_ = [[(NavTestAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext] autorelease]; 
      }
  
      UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(insertNewObject)];
      self.navigationItem.rightBarButtonItem = addButton;
      [addButton release];
  
      prikazDatabaseArray = [[[NSMutableArray alloc] init]retain];
  
      NSDate *now = [NSDate date];
      NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
      [dateFormatter setDateFormat:@"dd.MM.yyyy"];
      datumOd = [[dateFormatter stringFromDate:now] retain];
  
      [dateFormatter release];
  
      VObrat = YES;
  }    
  </code></pre>
  
  <p>I also use </p>
  
  <pre><code>NSAutoreleasePool *pool;
  NSURLConnection *theConnection;
  NSMutableURLRequest *theRequest;
  NSData *xmlData;
  NSData *xmlFile;
  NSXMLParser *addressParser;
  </code></pre>
  
  <p>in my code. If you could, at least help me find where I have the problem, because without  debug and console I feel like a blind man.</p>
  
  <p>Thanks a lot</p>