android开启线程执行Runtime.getRuntime().exec("logcat")去获取android log
线程会不断BufferedReader.readLine,前面抓取log是正常的,当线程一直运行大概2小时会报错
E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 88 byte allocation with 0 free bytes and 0B until OOM, target footprint 201326592, growth limit 201326592
分析log是BufferedReader.readLine这里的问题,不可以循环去readline?还是需要每读一次readLine就要close掉资源?
帮忙看看代码写的是不是合理的,还有问题的解决办法