[android-developers] Re: 'Avoiding memory leaks' article in android blog

2010-04-12 Thread NoraBora
On Apr 11, 11:23 am, Streets Of Boston wrote: > > If all it OK, you should only have on activity (the new one) and the > old one should be a candidate for garbage collection. But sBackground > is (indirectly) still referencing the old activity and it will not be > garbage collected. but when a n

[android-developers] Re: 'Avoiding memory leaks' article in android blog

2010-04-10 Thread Streets Of Boston
Yep, You don't directly see it, but if i have understood older posts correctly, sBackground has a reference to a context that was used when it was created. This context is the activity-context that holds on to the activity that originally was used when creating sBackground. So, via via, sBackgrou