Fix conversation memory leak.

This commit is contained in:
Cody Henthorne
2024-06-10 14:54:02 -04:00
committed by GitHub
parent 65dc0d3f34
commit 057ffdbaaf
5 changed files with 17 additions and 63 deletions

View File

@@ -102,6 +102,13 @@ public final class LiveRecipient {
ThreadUtil.postToMain(() -> observableLiveData.observe(owner, observer));
}
/**
* Removes observer of this data.
*/
public void removeObserver(@NonNull Observer<Recipient> observer) {
ThreadUtil.runOnMain(() -> observableLiveData.removeObserver(observer));
}
/**
* Removes all observers of this data registered for the given LifecycleOwner.
*/