Bug
3381368
The 250 characters limit is passed for long URLs. There are only 3
TextLine objects, so their total size is not an issue. Recycle long
lines as well to make sure we fill the cache and avoid object creation.
Change-Id: I843bf623594312a0fcf0edbb13b7cd64cce0ddd1
tl.mText = null;
tl.mPaint = null;
tl.mDirections = null;
- if (tl.mLen < 250) {
- synchronized(cached) {
- for (int i = 0; i < cached.length; ++i) {
- if (cached[i] == null) {
- cached[i] = tl;
- break;
- }
+ synchronized(cached) {
+ for (int i = 0; i < cached.length; ++i) {
+ if (cached[i] == null) {
+ cached[i] = tl;
+ break;
}
}
}