JAL-2727 null additional references on close
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 13 Sep 2017 09:01:36 +0000 (10:01 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 13 Sep 2017 09:01:36 +0000 (10:01 +0100)
src/jalview/gui/AlignmentPanel.java
src/jalview/viewmodel/AlignmentViewport.java

index 9b74007..c8a0e1a 100644 (file)
@@ -1621,8 +1621,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
     if (av != null)
     {
       av.removePropertyChangeListener(propertyChangeListener);
-      jalview.structure.StructureSelectionManager ssm = av
-              .getStructureSelectionManager();
+      propertyChangeListener = null;
+      StructureSelectionManager ssm = av.getStructureSelectionManager();
       ssm.removeStructureViewerListener(getSeqPanel(), null);
       ssm.removeSelectionListener(getSeqPanel());
       ssm.removeCommandListener(av);
index a66855e..a8afe9a 100644 (file)
@@ -948,11 +948,11 @@ public abstract class AlignmentViewport
     groupConsensus = null;
     groupConservation = null;
     hconsensus = null;
+    hconservation = null;
     hcomplementConsensus = null;
     gapcounts = null;
-    // colour scheme may hold reference to consensus
-    residueShading = null;
-    // TODO remove listeners from changeSupport?
+    calculator = null;
+    residueShading = null; // may hold a reference to Consensus
     changeSupport = null;
     ranges = null;
     setAlignment(null);