Android garbage collector very slow to free up memory -


i have defined viewgroup can come in , out of screen. when out of screen, of it's subviews destroyed save memory , these recreated when view comes screen.

most of these subviews imageviews use standard android:src=@drawable draw bitmap.

to destroy subviews, call viewgroup.removeallviews()

problem garbage collector takes time free memory , app's heap size increases dramatically if open/close viewgroup repeatedly.

is there way around this?

when out of screen, of it's subviews destroyed save memory , these recreated when view comes screen.

only if viewgroup never used again in activity. stands, causing own problem, releasing , re-allocating same stuff repeatedly.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -