http://mono-for-android.1047100.n5.nabble.com/file/n5711079/screen.png 

I have the above application.  Whenever the previous / next arrows are
clicked then the month changes and then the data that is displayed below
needs to be cleared and re-added with updated data.

I have implemented this but what I am seeing is that the application will
slowly eat more and more heap memory each time an arrow is clicked until the
point where starts to do constant, back-to-back, full Garbage collections. 
This causes my app to run extremely slowly and crash.

http://mono-for-android.1047100.n5.nabble.com/file/n5711079/logcat.png 

The code I'm using is pretty simple.  I just use FindViewById() to grab the
container layout and then I call container.RemoveAllViews().  After that I
re-add the views with updated data using inflation.  Is there a better way
to do this?  Or do I need to do something special to prevent memory leaks? 
Thanks.



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-handle-garbage-collection-tp5711079.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to