Out of memory in Android 2.3.2 -


i have application upon start request around 10-12kb of data server (in onresume, have thread starts data server) , paints in tabular form on view. each row of view consist of 5 textviews , 2 drawables.

now, application works fine on 2.2 , previous version of os, crashes on 2.3.2 out of memory error in oncreate method (while setting layout r.main). way recreate error keep on rotating device (around 20-25 times), app keeps on switching portrait landscape mode. looked @ ddms output , see pattern. if switch between portrait , landscape mode pretty fast ... system tries run gc... showing messages such

02-09 12:20:08.617: debug/dalvikvm(109): gc_explicit freed 426k, 47% free 6201k/11655k, external 4752k/5934k, paused 122ms 

but before crashing prints out lot of gc messages

02-09 12:20:12.875: debug/dalvikvm(184): gc_external_alloc freed 112k, 52% free 3022k/6215k, external 5127k/5136k, paused 110ms 02-09 12:20:12.933: debug/dalvikvm(28163): gc_external_alloc freed 108k, 34% free 7894k/11847k, external 20252k/20560k, paused 155ms 02-09 12:20:13.007: info/dalvikvm-heap(28163): clamp target gc heap 32.031mb 32.000mb 02-09 12:20:13.007: debug/dalvikvm(28163): gc_for_malloc freed 2k, 34% free 7891k/11847k, external 20254k/20560k, paused 47ms 02-09 12:20:13.074: debug/dalvikvm(28163): gc_external_alloc freed 0k, 34% free .... 

more such lines. , crash.

i'm unable understand why crashes in 1 os , not other. device samsung nexus s. ideas? ran mat tool on heap dump , see 5-6 instances of main activity class retained memory. sshouldn't memory garbage collected?

i see 5-6 instances of main activity class...

you leaking activities. worker threads keep references activities (or contexts or view-derived types) chance?

i urge read retaining object during configuration change in sdk. tells need change.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -