Android 16
Danylo Volokh
9711
Thanks very interesting !
About Typeface memory leak, I think it was fixed with Android 7.0.
From the SDK source code :
public static Typeface createFromAsset(AssetManager mgr, String path) {
if (sFallbackFonts != null) {
synchronized (sDynamicTypefaceCache) {
final String key = createAssetUid(mgr, path);
Typeface typeface = sDynamicTypefaceCache.get(key);
if (typeface != null) return typeface;
FontFamily fontFamily = new FontFamily();
if (fontFamily.addFontFromAsset(mgr, path)) {
FontFamily[] families = { fontFamily };
typeface = createFromFamiliesWithDefault(families);
sDynamicTypefaceCache.put(key, typeface);
return typeface;
}
}
}
throw new RuntimeException("Font asset not found " + path);
}