Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Getting huge number of memory leaks when using Xcode instruments to profile a Xamarin.ios applicatio

jj_ptjj_pt Member ✭✭

Hi, I have a mobile application which I was profiling to understand if there are memory leaks in it. The application seems to run smooth on my iphone, but the Leaks count in the instruments is going so high which is unbelievable. For me its going above 40K. Can anyone tell, can this be an issue with or it has something to do with the app. Infact all the leaked objects are shown as malloc and I am not able to reach to the exact object leaking.


  • ColeXColeX Member, Xamarin Team Xamurai
    edited April 2019

    Check the solution here : .

    Use the class in your application to see if decrease the memory leak.

  • JohnHardmanJohnHardman GBUniversity admin

    @ColeX - That's an interesting thread on StackOverflow. I've raised the subject before of making Xamarin samples follow best practices, but many still include code that will clearly result in memory leaks. Is there any plan for somebody to update samples to remove the anti-patterns? Until that is done, many people will copy those same anti-patterns into their own apps.

    (I'm not suggesting that @jj_pt has done this BTW).

  • jj_ptjj_pt Member ✭✭

    Thanks for all the answers, but I am not a developer myself, I am testing the app and giving the results from profiler. I digged in and understood many of then are system leaks and some are called repeatedly becoz of which the leaks count gets multiplied to such a huge number. Although still investigating,

Sign In or Register to comment.