Fix: two memory leaks
Co-authored-by: NekoInverter <chsqwyx@gmail.com>
This commit is contained in:
parent
f3a2340e11
commit
fcceccadeb
@ -941,6 +941,7 @@ public class EmojiPacksAlert extends BottomSheet implements NotificationCenter.N
|
||||
@Override
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
customEmojiPacks.recycle();
|
||||
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.startAllHeavyOperations, 4);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ public class DownloadProgressIcon extends View implements NotificationCenter.Not
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
detachCurrentListeners();
|
||||
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.onDownloadingFilesChanged);
|
||||
NotificationCenter.getInstance(currentAccount).removeObserver(this, NotificationCenter.onDownloadingFilesChanged);
|
||||
downloadImageReceiver.onDetachedFromWindow();
|
||||
downloadCompleteImageReceiver.onDetachedFromWindow();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user