title: Memory leaks while opening the sqlite database
body: <p>Following  methods gets called from didFinishLaunchingWithOptions,when I run on Instruments <strong>openDatabase</strong> method causing leaks..
  please suggest me how to clear</p>
  
  <pre><code>- (NSString*)getdestinationPath {
      NSArray *pathsArray=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
      NSString *doumentDirectoryPath=[pathsArray objectAtIndex:0];
      NSString *destinationPath=[doumentDirectoryPath stringByAppendingPathComponent:dataBaseName];
      NSLog(@"database path %@",destinationPath);
      return destinationPath;
  }
  
  
  
  
  - (void)chkAndCreateDatbase {
      NSFileManager *fileManger=[NSFileManager defaultManager];
      NSError *error;
      NSString *destinationPath=[self getdestinationPath];
      if ([fileManger fileExistsAtPath:destinationPath]){
          //NSLog(@"database localtion %@",destinationPath);
          return;
      }
      NSString *sourcePath=[[[NSBundle mainBundle] resourcePath]stringByAppendingPathComponent:dataBaseName];
      [fileManger copyItemAtPath:sourcePath toPath:destinationPath error:&amp;error];
  }
  
  
  
  
  
  - (void)openDatabase {
      path=[self getdestinationPath];
      if (sqlite3_open([path UTF8String], &amp;database)==SQLITE_OK) // here leak is showing
      {
          NSLog(@"dataBaseOpen");
      }
      else {
          sqlite3_close(database);
          NSLog(@"dataBaseNotOpen");  
      }   
  }
  </code></pre>