Loading core/java/android/text/TextLine.java +11 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,11 @@ class TextLine { tl.mText = null; tl.mPaint = null; tl.mDirections = null; tl.mMetricAffectingSpanSpanSet.recycle(); tl.mCharacterStyleSpanSet.recycle(); tl.mReplacementSpanSpanSet.recycle(); synchronized(sCached) { for (int i = 0; i < sCached.length; ++i) { if (sCached[i] == null) { Loading Loading @@ -919,6 +924,12 @@ class TextLine { } return limit; } public void recycle() { for (int i = 0; i < numberOfSpans; i++) { spans[i] = null; // prevent a leak: no reference kept when TextLine is recycled } } } /** Loading Loading
core/java/android/text/TextLine.java +11 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,11 @@ class TextLine { tl.mText = null; tl.mPaint = null; tl.mDirections = null; tl.mMetricAffectingSpanSpanSet.recycle(); tl.mCharacterStyleSpanSet.recycle(); tl.mReplacementSpanSpanSet.recycle(); synchronized(sCached) { for (int i = 0; i < sCached.length; ++i) { if (sCached[i] == null) { Loading Loading @@ -919,6 +924,12 @@ class TextLine { } return limit; } public void recycle() { for (int i = 0; i < numberOfSpans; i++) { spans[i] = null; // prevent a leak: no reference kept when TextLine is recycled } } } /** Loading