title: Autorelease objects in ARC
body: <p>Suppose in my Database Manager which is singleton.</p>
  
  <pre><code>+ (SWDatabaseManager *)retrieveManager
  {
      @synchronized(self)
      {
         if (!sharedSingleton)
         {
             sharedSingleton = [[SWDatabaseManager alloc] init];
         }
         return sharedSingleton;
      }
  }
  
  - (NSArray *)getProductDetails:(NSString *)someString 
  {
      NSArray *temp = [self getRowsForQuery:someString];
      return temp;
  }
  
  - (NSArray *)getRowsForQuery:(NSString *)sql
  {
      sqlite3_stmt *statement=nil;
      NSMutableArray *arrayResults = [NSMutableArray arrayWithCapacity:1];
      //
      //Fetching data from database and adds them in to arrayResults
      //
      return arrayResults;
  }
  </code></pre>
  
  <p>Now from some view controller i am calling function of Database manager like this....</p>
  
  <pre><code>[self getProductServiceDidGetDetail:[[SWDatabaseManager retrieveManager] getProductDetail: @"SomeQuery"]
  
  - (void)getProductServiceDidGetDetail:(NSArray *)detailArray 
  {
      [self setDataSource:[NSArray arrayWithArray:detailArray]];
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>Questions are ... 
  When arrayResult of getRowsForQuery will release?</p>
  
  <p>Do i need to assign nil to detailArray of getProductServiceDidGetDetail?</p>
  
  <p>Is there any memory leaks?</p>
  
  <p>Suggestion will be appreciated.</p>