From: James Procter Date: Tue, 5 Sep 2023 16:03:42 +0000 (+0100) Subject: JAL-629 remove structure viewer from the list of structure viewer base instances... X-Git-Tag: Release_2_11_4_0~194 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bd3274989cacc2be56b4f9e5dd006adb3be96637;p=jalview.git JAL-629 remove structure viewer from the list of structure viewer base instances when its closeViewer method is called --- diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index ff615c8..ed42ffa 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -1362,6 +1362,13 @@ public abstract class StructureViewerBase extends GStructureViewer // TODO: check for memory leaks where instance isn't finalised because jmb // holds a reference to the window // jmb = null; + + try { + svbs.remove(this); + } catch (Throwable t) + { + Console.info("Unexpected exception when deregistering structure viewer",t); + } dispose(); }