during profiling my app a bit I have discovered that mono keeps ALL my ever opened activities alive and so all gref's.
On the emulator I can easily run into a crash because my gref's are depleted and the count is not fully in sync between dalvik and mono so the full gc comes way to late.
Even in a very simple scenario with 3 activities (A, B, C) each with a button on it and a simple handler. When I navigate A -> B -> C and back to A with the backkey it seems that B and C are never fully finalized. When I repeat that navigation 10 times the profiler shows 10x Activity B and C with gc root pointing to the native stack. Together with these references my gref count is constantly increasing and never goes down except I do a manual GC.Collect() (the profiler drops to 0 activities as well).
Is that really the expected behavior?
As workaround I'm calling GC.Collect() in the OnDestroy but that is still very expensive and not really desired. Is there any other way or do I really have to rely on the automatic full collect at 90% gref usage (comes to late on emulator for me)?