You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by hi...@apache.org on 2002/02/12 14:06:25 UTC
cvs commit: xml-batik/sources/org/apache/batik/bridge UpdateManager.java
hillion 02/02/12 05:06:25
Modified: sources/org/apache/batik/bridge UpdateManager.java
Log:
Fixed a memory leak due to the update RunnableQueue waiting forever instead of beeing interrupted.
Revision Changes Path
1.7 +9 -12 xml-batik/sources/org/apache/batik/bridge/UpdateManager.java
Index: UpdateManager.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/UpdateManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- UpdateManager.java 11 Feb 2002 16:00:08 -0000 1.6
+++ UpdateManager.java 12 Feb 2002 13:06:25 -0000 1.7
@@ -47,7 +47,7 @@
* This class provides features to manage the update of an SVG document.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: UpdateManager.java,v 1.6 2002/02/11 16:00:08 tkormann Exp $
+ * @version $Id: UpdateManager.java,v 1.7 2002/02/12 13:06:25 hillion Exp $
*/
public class UpdateManager implements RunnableQueue.RunHandler {
@@ -122,6 +122,11 @@
protected UpdateTracker updateTracker;
/**
+ * The GraphicsNode whose updates are to be tracked.
+ */
+ protected GraphicsNode graphicsNode;
+
+ /**
* Creates a new update manager.
* @param ctx The bridge context.
* @param gn GraphicsNode whose updates are to be tracked.
@@ -141,16 +146,8 @@
updateRunnableQueue = RunnableQueue.createRunnableQueue();
updateRunnableQueue.setRunHandler(this);
- /*
- DOMImplementationWrapper iw;
- iw = new DOMImplementationWrapper(updateRunnableQueue,
- scriptingRunnableQueue,
- document.getImplementation());
-
- scriptingDocument = new DocumentWrapper(iw, document);
- */
-
updateTracker = new UpdateTracker();
+ graphicsNode = gn;
RootGraphicsNode root = gn.getRoot();
if (root != null){
@@ -286,6 +283,8 @@
dispatchEvent(evt);
running = false;
+ repaintRateManager.interrupt();
+ updateRunnableQueue.getThread().interrupt();
fireManagerStoppedEvent();
}
});
@@ -391,8 +390,6 @@
((UpdateManagerListener)dll[i]).managerStopped(ev);
}
}
- repaintRateManager.interrupt();
- updateRunnableQueue.getThread().interrupt();
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org