I see this type of code in angular modules
scope.$on('$destroy', function(){
I understand that whenever a scope needs to be destroyed, it emits a $destroy event, allowing you to clear any code that might continue to work after destroying a scope that would create memory leaks.
My question is when a region is naturally destroyed in an angularjs application. All the documentation I can find on the website is that you can manually call $destroy to delete the area, but this seems to suggest that this will happen at some point automatically. When it will be?
source share