diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 254b20b87..2a02682e5 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -605,4 +605,8 @@ public class KeyboardView extends View { super.onDetachedFromWindow(); freeOffscreenBuffer(); } + + public void deallocateMemory() { + freeOffscreenBuffer(); + } } diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 35742ef8c..5334b45b6 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -1271,7 +1271,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack } } + @Override public void deallocateMemory() { + super.deallocateMemory(); mGestureTrailsPreview.deallocateMemory(); } }