Monica
Monica

Reputation: 141

xamarin.forms know memory usage both for android and ios

I am trying to develop android and iOS application using xamarin.forms. And already completed the main part that includes Canvas drawing. For that, I have used Skiasharp, to perform operations on bitmap images.

Now, in android, 1. If I try to dispose bitmaps that I initialized before I get SIGSEGV fatal error. (I think this issue is not OS specific) 2. When I continuously run my app for 20-22 minutes, app crashes suddenly.

And in iOS, my iphone gets hanged when I run my app for long time. And it doesn't start until I uninstall app from iFunBox in my pc.

I wanted to ask if there are ways in xamarin.forms or in native projects to find out where my memory is leaking. How can I know how much memory of RAM is actually being used at the moment ?

Thank you

Upvotes: 1

Views: 3002

Answers (1)

Json
Json

Reputation: 1704

For Android, you can use the Android Debug Monitor tool. This is a tool that is installed as part of the Android SDK.

Below is the URL for more information:

https://www.codeproject.com/Articles/798462/Diagnosing-Memory-Usage-in-a-Xamarin-Android-Appli

For iOS, you can try to use the native XCode Instrument.

Below is the URL for more information:

https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/using_instruments_to_detect_native_leaks_using_markheap/

Also, Below is a useful article that talk about Xamarin.Forms Memory management. Hopefully it will be helpful.

https://igorelikblog.wordpress.com/2016/07/08/xamarin-form-memory-management/

Upvotes: 1

Related Questions