* commit '67aa1a93f8376d73511ca6d08052298326eb3b44': Fix memory leak in EmojiPaletteView
This commit is contained in:
commit
2715465b94
1 changed files with 6 additions and 3 deletions
|
@ -694,13 +694,16 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
|
||||||
@Override
|
@Override
|
||||||
public void destroyItem(final ViewGroup container, final int position,
|
public void destroyItem(final ViewGroup container, final int position,
|
||||||
final Object object) {
|
final Object object) {
|
||||||
ScrollKeyboardView keyboardView = mActiveKeyboardViews.get(position);
|
final ScrollKeyboardView keyboardView = mActiveKeyboardViews.get(position);
|
||||||
if (keyboardView != null) {
|
if (keyboardView != null) {
|
||||||
keyboardView.deallocateMemory();
|
keyboardView.deallocateMemory();
|
||||||
mActiveKeyboardViews.remove(position);
|
mActiveKeyboardViews.remove(position);
|
||||||
}
|
}
|
||||||
container.removeView(keyboardView);
|
if (object instanceof View) {
|
||||||
keyboardView = null;
|
container.removeView((View)object);
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "Warning!!! Emoji palette may be leaking. " + object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue