Merge "Fix bug #5344067 android.text.DynamicLayout.sStaticLayout can hold onto an Activity, potential memory leak"

This commit is contained in:
Fabrice Di Meglio
2011-09-26 12:16:30 -07:00
committed by Android (Google) Code Review

View File

@@ -275,7 +275,7 @@ extends Layout
} }
if (reflowed == null) { if (reflowed == null) {
reflowed = new StaticLayout(getText()); reflowed = new StaticLayout(null);
} else { } else {
reflowed.prepare(); reflowed.prepare();
} }
@@ -488,7 +488,7 @@ extends Layout
private int mTopPadding, mBottomPadding; private int mTopPadding, mBottomPadding;
private static StaticLayout sStaticLayout = null; private static StaticLayout sStaticLayout = new StaticLayout(null);
private static final Object[] sLock = new Object[0]; private static final Object[] sLock = new Object[0];