1

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

Monica
  • 141
  • 4
  • 16
  • https://www.xamarin.com/profiler – Jason Oct 02 '17 at 17:30
  • Thanks @Jason for the comment. but I have VS Community version. and I think profiler works on Enterprise version. I have already read about that. Will it work for xamarin studio ? – Monica Oct 02 '17 at 17:33
  • https://developer.xamarin.com/guides/cross-platform/profiler/#Profiler_Support – ColeX Oct 03 '17 at 01:45

1 Answers1

1

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/

Json
  • 1,655
  • 1
  • 13
  • 21
  • Sorry for lil late @Janson. I tried link for ios. Is it for xamarin.ios specific ? Because, I tried for my pcl code but I couldn't see any code responsible for memory leaks as shown in documentation. – Monica Oct 06 '17 at 16:04
  • This answer (https://stackoverflow.com/a/45086015/5483868) helps me to found the memory leak that cause in my Android device. – Json Nov 23 '17 at 12:06