Skip to content

Commit 6516637

Browse files
committed
properly close model
1 parent 6378dd3 commit 6516637

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,16 +489,17 @@ else if (task.status == TaskStatus.FAILED)
489489
else if (task.status == TaskStatus.CRASHED)
490490
throw new RuntimeException();
491491
this.runner.close();
492+
this.runner = null;
492493
return;
493494
} else if (this.interprocessing) {
494495
return;
495496
}
496-
sig = null;
497497
if (model != null) {
498498
model.session().close();
499499
model.close();
500500
}
501501
model = null;
502+
sig = null;
502503
}
503504

504505
// TODO make only one

0 commit comments

Comments
 (0)