提交 4deb9ff8 编写于 作者: P prr

6728838: Native memory leak in StrikeCache.java

Reviewed-by: bae, igor
上级 1297a13d
......@@ -232,6 +232,16 @@ public final class StrikeCache {
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);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册