question

NavinSamuel-8837 avatar image
0 Votes"
NavinSamuel-8837 asked JarvanZhang-MSFT commented

Received memory pressure event 1 vm pressure 0 error due to MemoryStream

In Xamarin.Forms application, We are getting "Received memory pressure event 1 vm pressure 0" when i use the iOS app for more time. RCA : We have a view(like Feeds in instagram) and it has list of images say 10 images. We are creating instance of memory stream in the converter attached to the image. So each time the page loads, 10 instance of memory stream is created. And when we are in the view and if an image gets updated, it is creating a new instance of memorystream again for all images, so the instance is getting increased and it is throwing the memory error. If i dispose memorystream, then, image is not loading. How to handle this?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So each time the page loads, 10 instance of memory stream is created.

What control do you use to display the images and how do you set source for the image views? Could you please post the related code? It'll help to reproduce the issue to get the cause.

0 Votes 0 ·

0 Answers