Bug 4567 - how to heapshot tweetstation
Summary: how to heapshot tweetstation
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.2
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-20 13:30 UTC by Chris Toshok
Modified: 2012-06-01 17:06 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED INVALID

Description Chris Toshok 2012-04-20 13:30:14 UTC
repro:

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.
Comment 1 Miguel de Icaza [MSFT] 2012-04-20 21:05:13 UTC
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.
Comment 2 Chris Toshok 2012-04-24 00:42:05 UTC
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?
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-06-01 08:31:24 UTC
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).
Comment 4 Chris Toshok 2012-06-01 17:06:50 UTC
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.