Skip to content

Commit eabb9ac

Browse files
committed
properly close model
1 parent 42bc209 commit eabb9ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/main/java/io/bioimage/modelrunner/tensorflow/v2/api020/Tensorflow2Interface.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,17 @@ else if (task.status == TaskStatus.FAILED)
502502
else if (task.status == TaskStatus.CRASHED)
503503
throw new RuntimeException();
504504
this.runner.close();
505+
this.runner = null;
505506
return;
506507
} else if (this.interprocessing) {
507508
return;
508509
}
509-
sig = null;
510510
if (model != null) {
511511
model.session().close();
512512
model.close();
513513
}
514514
model = null;
515+
sig = null;
515516
}
516517

517518
// TODO make only one

0 commit comments

Comments
 (0)