We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 391b706 commit fe2c790Copy full SHA for fe2c790
spyglass/src/main/java/com/linkedin/android/spyglass/ui/MentionsEditText.java
@@ -1379,7 +1379,9 @@ public void setAvoidPrefixOnTap(boolean avoidPrefixOnTap) {
1379
@Override
1380
public Parcelable onSaveInstanceState() {
1381
Parcelable parcelable = super.onSaveInstanceState();
1382
- return new SavedState(parcelable, getMentionsText());
+ // Save a copy of MentionsEditable to avoid leaking memory from persisted watchers,
1383
+ // as is done in TextView.onSaveInstanceState().
1384
+ return new SavedState(parcelable, new MentionsEditable(getMentionsText()));
1385
}
1386
1387
0 commit comments