admin 管理员组文章数量: 1086019
Can android app crash lead to memory leak?
AFAIK - activity and services and receivers and content-providers of an app are processes. When the app crashes (eg NoSuchElementException), processes of all these components of the app also die. Then the garbage collection takes care of memory - ie it takes back all the memory used for the system. Hence there should be no memory leaks - but I just wanted to confirm.
Can android app crash lead to memory leak?
AFAIK - activity and services and receivers and content-providers of an app are processes. When the app crashes (eg NoSuchElementException), processes of all these components of the app also die. Then the garbage collection takes care of memory - ie it takes back all the memory used for the system. Hence there should be no memory leaks - but I just wanted to confirm.
Share Improve this question asked Mar 28 at 17:23 Rishabh GuptaRishabh Gupta 8241 gold badge7 silver badges13 bronze badges2 Answers
Reset to default 2When your app crashes, the process is terminated. That means all resources allocated to the process are returned to the OS. So no, it can't cause a memory leak, unless there's an OS level bug in the memory allocator. Which on Linux (the base OS of Android) would be incredibly unlikely.
The garbage collection operation carrier of the art virtual machine is your application process itself.
If the application process crashes, the resource recovery operation is guaranteed by the Android system.
本文标签: Can android app crash lead to memory leakStack Overflow
版权声明:本文标题:Can android app crash lead to memory leak? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744022277a2520015.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论