Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to release memory when converting UIView to UIImage

$
0
0

I have a problem when convert multiple UIView to UIImage to save into disk. I used the following to convert each UIView to UIImage UIImage image; UIGraphics.BeginImageContext (View.Frame.Size); View.Layer.RenderInContext (UIGraphics.GetCurrentContext ()); image = UIGraphics.GetImageFromCurrentImageContext (); UIGraphics.EndImageContext ();

and I run a loop to convert multiple UIView. If the number of converted UIView is about 30 or more, the app is crashed. Please help me to resolve this problem. Thank you very much!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>