I Know the question regarding out of memory already been asked ,but i found no solution
In Bitmap Factory i got out of memory Exception, even use
inSampleSize=1
so i use to surrounded it by try catch out of memory exception since it is a bad practice
try{
.........
......
}catch (OutOfMemoryError e)
{}
out of memory exception also caught but my question is after caught of this exception shall we
Clearing or reallocating heap memory of GC
is there any solution ?
i use
System.gc();
no use please help!!!!!!!
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.
After 3 days of struggle i found a solution for not increasing Heap memory by using this
i replace all my ImageView like this
Using this class i use to clear the Image bitmap heap size in onDetachedFromWindow function
now it works fine and my heap memory remains