Skip to content

Commit

Permalink
set model to null when closed
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Aug 7, 2024
1 parent b8ef3e6 commit e048970
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public void notifyUiHasBeenClosed() {
*/
public void closeProcess() {
efficientSamJ.close();
efficientSamJ = null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public void notifyUiHasBeenClosed() {
*/
public void closeProcess() {
efficientSamJ.close();
efficientSamJ = null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public void notifyUiHasBeenClosed() {
*/
public void closeProcess() {
efficientSamJ.close();
efficientSamJ = null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public void notifyUiHasBeenClosed() {
*/
public void closeProcess() {
efficientSamJ.close();
efficientSamJ = null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public void notifyUiHasBeenClosed() {
*/
public void closeProcess() {
efficientSamJ.close();
efficientSamJ = null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public boolean isInstalled() {
*/
public void setImage(final RandomAccessibleInterval<?> image, final SAMJLogger useThisLoggerForIt)
throws IOException, InterruptedException, RuntimeException {
if (this.efficientSamJ == null)
this.efficientSamJ = EfficientViTSamJ.initializeSam("xl1", manager);
try {
this.log = useThisLoggerForIt;
AbstractSamJ.DebugTextPrinter filteringLogger = text -> {
Expand Down Expand Up @@ -223,6 +225,7 @@ public void notifyUiHasBeenClosed() {
*/
public void closeProcess() {
efficientSamJ.close();
efficientSamJ = null;
}

@Override
Expand Down

0 comments on commit e048970

Please sign in to comment.