Tips/Techniques for tracking down leaks in monotou

2020-03-06 02:55发布

问题:

What are folks using to track down memory leaks? I've managed via code inspection to figure some problems, but I am at a loss to what can I do next / how am I going to manage issues when my program gets bigger. I know what type of object I'm leaking, but I don't know what is keeping it alive.

In windows .NET, I would just fire up SOS in windbg and via a combination of !dumpheap and !gcroot I would be able to find out what was leaking and who was holding live references to the objects that were not getting collected.

回答1:

We are working to integrate the new Mono profiler (http://mono-project.com/Profile) into MonoTouch's user interface to give you access to this kind of information.



回答2:

MonoTouch 5.2.3 is out today and it has the profiler in it. Very useful!