Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group 'io.tiledb'
version '0.19.3-SNAPSHOT'
version '0.19.4-SNAPSHOT'

repositories {
jcenter()
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/io/tiledb/java/api/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class Context implements AutoCloseable {
private SWIGTYPE_p_p_tiledb_ctx_t ctxpp;
private SWIGTYPE_p_tiledb_ctx_t ctxp;
private ContextCallback errorHandler;
private Config config;

/**
* Constructor. Creates a TileDB Context with default configuration.
Expand Down Expand Up @@ -181,6 +182,7 @@ private void createContext(Config config) throws TileDBError {
tiledb.delete_tiledb_ctx_tpp(_ctxpp);
throw new TileDBError("[TileDB::JavaAPI] Error: Failed to create context");
}
this.config = config;
this.ctxpp = _ctxpp;
this.ctxp = tiledb.tiledb_ctx_tpp_value(_ctxpp);
this.errorHandler = new ContextCallback();
Expand Down Expand Up @@ -258,8 +260,8 @@ public String getStats() throws TileDBError {
/**
* Close the context and delete all native objects. Should be called always to cleanup the context
*/
public void close() throws TileDBError {
this.getConfig().close();
public void close() {
config.close();
if (ctxp != null) {
tiledb.tiledb_ctx_free(ctxpp);
tiledb.delete_tiledb_ctx_tpp(ctxpp);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/tiledb/java/api/Domain.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ public void close() {
if (domainp != null) {
tiledb.tiledb_domain_free(domainpp);
tiledb.delete_tiledb_domain_tpp(domainpp);
domainpp = null;
domainp = null;
}
}
}