我知道有关内存不足的问题,但我找不到任何解决方案
在Bitmap Factory中我得到了内存异常,甚至使用
inSampleSize=1
Run Code Online (Sandbox Code Playgroud)
所以我习惯用try catch out of memory of exception来包围它,因为这是一个不好的做法
try{
.........
......
}catch (OutOfMemoryError e)
{}
Run Code Online (Sandbox Code Playgroud)
内存不足异常也被捕获但我的问题是我们抓住了这个异常之后
清除或重新分配GC的堆内存
有什么办法吗?
我用
的System.gc();
没有用请帮忙!!!!!!!
Run Code Online (Sandbox Code Playgroud)not even Bitmap also for GridView Orientation i found this exception Clamp target GC heap from 17.333MB to 16.000MB Out of memory on a 140416-byte allocation.