Hi,

On Thu, Nov 17, 2011 at 5:26 PM, René Ruppert
<[email protected]> wrote:
> Hi,
>
> from time to time I have to ask if there's any news regarding this topic:
> how to track memory usage of a Monotouch app?
> Activity monitor shows me growing "Real Mem" all the time and at some point
> it drops back if GC kicks in but I'm never sure if it's leaky or if I have
> to optimize things to consume less memory.
>
> Evaluating my options:
> * Is there a memory watchdog tool in the pipeline at Xamarin?
A memory profiler is in the pipeline, yes (and it won't take 6 months
before you see it).

> * Can I force a memory warning when running on the device to see how much
> memory MT will clean up?
http://stackoverflow.com/questions/4717138/ios-development-how-can-i-induce-low-memory-warnings

> * Is it a good idea to add a button that triggers GC.Collect() and
> GC.WaitForPendingFinalizers() to see if Real Mem drops in Instruments?
It won't really tell you anything useful, just how much would be freed
in the next GC. There is one scenario where it might be useful: if you
want to see if two different ways of doing something has a different
memory usage, in which case you'd GC.Collect at the end before you get
the memory usage (to ensure that objects waiting to be GC'ed are not
included in the comparison).

Rolf

>
> I will ask again in 6 months if there is no satisfying answer :-)
>
> René
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to