public static NativeDB open(NativeOptions options, File path) throws IOException, DBException { checkArgNotNull(options, "options"); checkArgNotNull(path, "path"); long rc[] = new long[1]; try { checkStatus(DBJNI.Open(options, path.getCanonicalPath(), rc)); } catch (IOException e) { if (rc[0] != 0) { DBJNI.delete(rc[0]); } throw e; } return new NativeDB(rc[0]); }
public void delete() { assertAllocated(); DBJNI.delete(self); self = 0; }