Skip to content

Commit 40affdc

Browse files
committed
properly close model
1 parent 90e4910 commit 40affdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/bioimage/modelrunner/tensorflow/v2/api050/Tensorflow2Interface.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -490,16 +490,17 @@ else if (task.status == TaskStatus.FAILED)
490490
else if (task.status == TaskStatus.CRASHED)
491491
throw new RuntimeException();
492492
this.runner.close();
493+
this.runner = null;
493494
return;
494495
} else if (this.interprocessing) {
495496
return;
496497
}
497-
sig = null;
498498
if (model != null) {
499499
model.session().close();
500500
model.close();
501501
}
502502
model = null;
503+
sig = null;
503504
}
504505

505506
// TODO make only one

0 commit comments

Comments
 (0)