42

面试经历:记一次Android面试-wx5cdd5c422843b的博客

 4 years ago
source link: https://blog.51cto.com/14339141/2399063
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Android中的内存泄漏和内存溢出有什么区别?内存溢出是指程序在申请内存的时候,没有足够的内存可以分配,导致OutOfMemory错误,也就是OOM。内存泄漏:对象都有生命周期的,在生命周期完成之后,就该被垃圾回收和释放,如果得不到及时的释放,就会一直占用内存,造成内存泄漏。随着内存泄漏的堆积,可用的内存空间越来越少,最后会导致内存溢出。导致内存泄漏有很多原因,最常见的有内部类的使用,因为内部类

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK