Question

I have recently been tasked with profiling an application written in Xamarin.iOS using Xamarin Studio. The problem I'm facing is that I don't know whether I can trust the Xamarin Studio profiler when the XS profiler says something different to the Instruments profiler.

I am using ShinobiCharts to create graphs in my application, and I'm trying to find causes of excess memory allocation in the application. If I am to trust the profilers, then the application is not releasing ANY of the memory allocated for the graphs, even when I create a new one.

I had assume that if I allocated over a previously allocated graph instance, the memory that had previously been allocated would be marked free, and the GC would collect. However, this doesn't seem to be the case.

Does anyone have any information regarding this?

Quick note: I have tried using the Dispose() function, and to apparently no avail.

Was it helpful?

Solution

It looks to me like you should not trust the profilers in this case! The Xamarin profiler will only track managed objects. The "Instruments" profiler tracks native objects. So the native objects (in this case Shinobi) won't be showing in the Xamarin profiler. So the charts are probably getting released, but you aren't seeing this because you are using the Xamarin profiler - which only tracks the managed objects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top