On Wed, Jun 29, 2011 at 4:58 PM, Atlan <[email protected]> wrote:
> I am really total desperate. Since a week I am searching a memory leak in my
> App.

You have not demonstrated that you have a memory leak in your app.

> I reduced everything to that little Activity attached.
> The problem occurres if the orientation changes. For example if I change the
> orientation in the emulator 6 times I have 6 Instances of my
> Activity in MAT.

This is perfectly normal. The garbage collector has not garbage
collected the other activity instances yet.

> It seams as the ListView holds a reference to my Activity

Yes, it does.

> but I have no Idea how to get rid of this reference and how to solve that
> problem.

You have not demonstrated that there is a problem. A problem, in a
garbage-collected language like Java, is when you have static
references to objects, preventing them from being garbage-collected.
If you find that there are static references to your activities, and
you created those static references, fix them. If you find that there
are static references to your activities, and you believe that those
references come from Android, write back with relevant details.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.9 Available!

-- 
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