X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationPanel.java;h=0b2f6cc24dcaacaad9f3be57b2fe8d52a1cbc6fc;hb=3446323f14bb8a2842cb83f74ed3f41c99b62759;hp=74505554f45fe802fc4677c2aee01cacd3d7105b;hpb=c73c8c28e34bdcac21e89aa89b69e85dad9e0189;p=jalview.git diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 7450555..0b2f6cc 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -123,8 +123,6 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, boolean mouseDragging = false; - boolean MAC = false; - // for editing cursor int cursorX = 0; @@ -142,9 +140,6 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, */ public AnnotationPanel(AlignmentPanel ap) { - - MAC = jalview.util.Platform.isAMac(); - ToolTipManager.sharedInstance().registerComponent(this); ToolTipManager.sharedInstance().setInitialDelay(0); ToolTipManager.sharedInstance().setDismissDelay(10000); @@ -1139,4 +1134,25 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, return null; } } + + /** + * Try to ensure any references held are nulled + */ + public void dispose() + { + av = null; + ap = null; + image = null; + fadedImage = null; + gg = null; + _mwl = null; + + /* + * I created the renderer so I will dispose of it + */ + if (renderer != null) + { + renderer.dispose(); + } + } }