Hello All,

I am trying to get rid of the memory leaks in my application. The
structure of the application is as follows: the main tab activity
includes several other activities as its tabs, one of these child
activities contains a map view to display a standard Google map.

I noticed that after the application is restarted a copy of the main
activity (and all its children) is created, so, of course, the memory
is consumed very quickly. By memory profiling I eliminated several
long-lived pointers to my activities. However, according to the
profiling data, one last pointer is retained by the map with the
following path to garbage collection:

<my tab activity> @
0x4323c2f0
'- mParent <my child activity with map>   @
0x4324c788
   '- context com.google.common.io.android.AndroidPersistentStore @
0x43250180
      '- store com.google.googlenav.map.MapFlashService @
0x43263d70
         '- flashService com.google.googlenav.map.MapService @
0x43263158
            |- <Java Local>, target java.lang.Thread @ 0x4326cf00
MapService Thread
            |- mapService com.google.googlenav.map.Map @
0x43262538

So it seems that the map service is keeping the pointer to my activity
in order to use its persistent store, and this pointer is not released
after the activity, to which it refers, is destroyed. Is this the
intended behavior of the map service? Also, is it possible to release
this pointer somehow to allow the garbage collector to recycle the
activity?

Thanks in advance for your suggestions!

---
Best regards,
Katsiaryna
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to