search

Home  >  Q&A  >  body text

Android 如何查找OOM问题

PHP中文网PHP中文网2772 days ago581

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 15:50:26

    OOM is caused by memory leaks in the java layer

    1. Use leakcanary detection

    2. First use MAT to obtain the current memory situation of the mobile phone, and then use monkey testing. After observing that the memory of the process continues to increase, use MAT to obtain the new memory situation.
      Compare and analyze the two files to see what objects are held and cause memory leaks.

    The first doubt is Bitmap or large array

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:50:26

    After AS1.5, there are tools to detect memory leaks, or you can directly use square's leakcanary, which may be more intuitive. After the memory leak is dealt with, it should be much better

    reply
    0
  • Cancelreply