mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 2d3e1210
: Fix memory leak in EmojiPaletteView
* commit '2d3e121014a97b7de90f287f1ef82fa98f37007c': Fix memory leak in EmojiPaletteView
This commit is contained in:
commit
67aa1a93f8
@ -694,13 +694,16 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
|
||||
@Override
|
||||
public void destroyItem(final ViewGroup container, final int position,
|
||||
final Object object) {
|
||||
ScrollKeyboardView keyboardView = mActiveKeyboardViews.get(position);
|
||||
final ScrollKeyboardView keyboardView = mActiveKeyboardViews.get(position);
|
||||
if (keyboardView != null) {
|
||||
keyboardView.deallocateMemory();
|
||||
mActiveKeyboardViews.remove(position);
|
||||
}
|
||||
container.removeView(keyboardView);
|
||||
keyboardView = null;
|
||||
if (object instanceof View) {
|
||||
container.removeView((View)object);
|
||||
} else {
|
||||
Log.w(TAG, "Warning!!! Emoji palette may be leaking. " + object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user