--- a/jdk/src/share/classes/sun/font/StrikeCache.java Thu Dec 18 11:25:09 2008 -0800
+++ b/jdk/src/share/classes/sun/font/StrikeCache.java Wed Dec 24 09:53:52 2008 -0800
@@ -232,6 +232,16 @@
if (disposer.pScalerContext != 0L) {
freeLongMemory(new long[0], disposer.pScalerContext);
}
+ } else if (disposer.pScalerContext != 0L) {
+ /* Rarely a strike may have been created that never cached
+ * any glyphs. In this case we still want to free the scaler
+ * context.
+ */
+ if (FontManager.longAddresses) {
+ freeLongMemory(new long[0], disposer.pScalerContext);
+ } else {
+ freeIntMemory(new int[0], disposer.pScalerContext);
+ }
}
}