Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
1. build tweetstation with llvm and sgen
2. upload to phone
3. run instruments on it
4. use the app. click heapshot periodically.
5. notice heap growth.
6. expand heapshots.
7. notice tweetstation types (and other managed types) that presumably should be going away.
TweetStation does very little in the way of disposing any resources.
This is because when I wrote it there was no way of knowing when a view controller was being popped out, so per design, it keeps everything that you ever use in memory.
So growth of resources is natural, since the code just hangs to everything. The only thing that TweetStation tries to dispose is the image cache when the memory is low.
Tweetstation is not very useful as a test case to report problems against its memory use due to its implementation.
It is very likely that problems exist, but we need more detailed information than just "use the app", since using the app is expected to keep everything in memory. For this bug to be useful, we need specifics of objects that should be released, but are not.
seriously? I'm not going to spend more time heapshotting tweetstation - I already suggested that to see the issue all you have to do is run it. what more info do you need that you couldn't find in 30 seconds?
Technically it's TweetStation itself that's leaking lots of memory, so any leak in MonoTouch is quite insignificant (and quite difficult to find in all the noise TweetStation's leaks create).
tweetstation (the app) is *not* leaking the types that I was trying to point.
this is another instance of the same problem I've been harping on for going on 7 months now: The longer objects stay alive, the more chance they will continue to stay alive, regardless of whether or not they should be alive.
I.e. if you manually call GC.Collect early, objects go away. if you call it later, they don't. Clearly they were garbage or they wouldn't have been collected early. and yet they're still there after a GC pass.