Skip to content

Commit 716a622

Browse files
committedOct 3, 2024·
properly close model
1 parent d8c0725 commit 716a622

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/main/java/io/bioimage/modelrunner/tensorflow/v1/Tensorflow1Interface.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,17 @@ else if (task.status == TaskStatus.FAILED)
514514
else if (task.status == TaskStatus.CRASHED)
515515
throw new RuntimeException();
516516
this.runner.close();
517+
this.runner = null;
517518
return;
518519
} else if (this.interprocessing) {
519520
return;
520521
}
521-
sig = null;
522522
if (model != null) {
523523
model.session().close();
524524
model.close();
525525
}
526526
model = null;
527+
sig = null;
527528
}
528529

529530
// TODO make only one

0 commit comments

Comments
 (0)
Please sign in to comment.