Created
June 14, 2022 09:45
-
-
Save mazzouzi/ede893ef58e4528468bad849e7098d65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onStop() { | |
super.onStop() | |
/** | |
* Always unregister to the Android API before the view gets destroyed | |
* -> no memory leak ✅ | |
*/ | |
activity?.unregisterReceiver(localBroadcastReceiver) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment