Is it possible that the local (i.e. managed by LocalBroadcastManager) BroadcastReceiver leaks when the application is killed by the system?
The specific use case for which I need it is that I would like to register / unregister BroadcastReceiver in Activity onCreate / onDestroy (I need the receiver to be active when the activity is not visible), but I wouldn’t, for example, at the risk of causing a memory leak by doing so. As far as I understand, if one action is destroyed by the system, onDestroy is launched, and the receiver is not registered. What if the application is killed? Does the receiver remain, or, being local, is it killed along with the application?
source share