diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java index 6d3eb56495..50ed0daa0b 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java @@ -52,7 +52,7 @@ import com.vividsolutions.jts.geom.Geometry; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 1, 2010 jsanchez Initial creation - * Aug 22, 2011 10631 njensen Major refactor + * Aug 22, 2011 10631 njensen Major refactor * May 3, 2012 DR 14741 porricel Stop setting end time of orig. * warning to start time of update. * Jun 04, 2012 DR14992 mgamazaychikov Fix the problem with plotting expiration time for @@ -63,6 +63,8 @@ import com.vividsolutions.jts.geom.Geometry; * Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning * Sep 5, 2013 2176 jsanchez Disposed the emergency font. * Feb 19, 2014 2819 randerso Removed unnecessary .clone() call + * Mar 04, 2014 2832 njensen Set fonts to null in disposeInternal() so recycle works + * Set entry.project to true for recycle * * * @author jsanchez @@ -139,15 +141,22 @@ public class WarningsResource extends AbstractWWAResource { if (entry.wireframeShape != null) { entry.wireframeShape.dispose(); } + + /* + * we set this to true and keep the entries around solely in case + * this resource is being recycled + */ + entry.project = true; } - entryMap.clear(); if (warningsFont != null) { warningsFont.dispose(); + warningsFont = null; } if (emergencyFont != null) { emergencyFont.dispose(); + emergencyFont = null; } } diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java index 6605c8da03..ab95ba9951 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java @@ -53,6 +53,7 @@ import com.vividsolutions.jts.geom.GeometryFactory; * Nov 8, 2013 16758 mgamazaychikov Changed access modifier of mergeWatches to protected * so a child class can override the implementation. * Feb 19, 2014 2819 randerso Removed unnecessary .clone() call + * Mar 04, 2014 2832 njensen Set fonts to null in disposeInternal() so recycle works * * * @author jsanchez @@ -143,10 +144,12 @@ public class WatchesResource extends AbstractWWAResource { entryMap.clear(); if (warningsFont != null) { warningsFont.dispose(); + warningsFont = null; } if (emergencyFont != null) { emergencyFont.dispose(); + emergencyFont = null; } }