Revision: 2469
          http://vexi.svn.sourceforge.net/vexi/?rev=2469&view=rev
Author:   clrg
Date:     2007-10-15 06:02:00 -0700 (Mon, 15 Oct 2007)

Log Message:
-----------
Use a WeakHashMap to to allow gc of unused fonts

Modified Paths:
--------------
    trunk/core/org.vexi.core/src/org/vexi/graphics/Font.java

Modified: trunk/core/org.vexi.core/src/org/vexi/graphics/Font.java
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/graphics/Font.java    2007-10-15 
13:01:18 UTC (rev 2468)
+++ trunk/core/org.vexi.core/src/org/vexi/graphics/Font.java    2007-10-15 
13:02:00 UTC (rev 2469)
@@ -8,6 +8,7 @@
 import java.io.InputStream;
 import java.util.LinkedList;
 import java.util.Queue;
+import java.util.WeakHashMap;
 
 import org.ibex.js.JS;
 import org.ibex.js.JSU;
@@ -59,7 +60,7 @@
     static final Queue glyphsToBeCached = new LinkedList();
     // FIXME - have this as a priority task
     //static final Queue glyphsToBeDisplayed = new LinkedList();
-    private static Basket.Map fonts = new Basket.Hash();
+    private static WeakHashMap fonts = new WeakHashMap();
     public static Font getFont(JS stream, int pointsize) {
         Basket.Map m = (Basket.Map)fonts.get(stream);
         Font ret = null;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to