Im using local BroadcastReceivers in some of my activities to handle broadcasts sent through LocalBroadcastManager. I saw many recommendations (e.g. here) that suggest not to register/unregister those receivers in onCreate/onDestroy activity handlers.
I dont quite understand why. The "official" explanation is that onDestory is not guaranteed to be called everytime the activity is destroyed :
"There are situations where the system will simply kill the activity's hosting process without calling this method (or any others) in it..."
Doesn't "killing the hosting process" means that there is an overall cleanup of the entire activities' resources ? Doesnt this cleanup include locally registered receivers ? How come this recommendation doesnt apply to other locally defined objects ? How come they are guaranteed to be cleaned and BroadcastReceivers not ?
Appreciate your knowledgable advices.