0
02-08 12:18:11.294: E/AndroidRuntime(25243): java.lang.OutOfMemoryError: (Heap Size=36771KB, Allocated=7320KB)

How do i optimise the usage of memory? More often than not, I'm encountering the above problem.

1) How do i clear imageAdapter, gridview, imageview and anything that deals with large data in fragments if i need to do addToBackStack. For fragment, replace was use to transit pages.

2) Is there any other ways to allow back button click to previous page (fragments) while clearing everything on the fragment page when transiting to next page?

iceraven
  • 225
  • 1
  • 5
  • 16
  • You can shrink the image height width to reduce the `OutOfMemoryError`. – GrIsHu Feb 08 '13 at 04:44
  • Print your code so that other can be improve your code to get out of your problem. – Maulik Feb 08 '13 at 05:47
  • I'm just trying to get my concept right? 1) How to end a fragment properly such that all images loaded in fragment would be destroyed? replace would be sufficient? even if i did addToBackStack? – iceraven Feb 08 '13 at 06:03

0 Answers0