Hi All,
I have this code using James' Media Plugin
MemoryStream ms = new MemoryStream();
file.GetStream().CopyTo(ms);
imageToUpload.Add(ms.ToArray());
imgSourceList.Add(new ImageToSet { imageData = ImageSource.FromStream(() => new MemoryStream(ms.ToArray())) });
Counter++;
if (!submitForm.IsEnabled) submitForm.IsEnabled = true;
file.Dispose();
ms.Dispose();
There seems to be a memory leak in the app because after a lot of photos have been taken its crashing, this is the only possible place it could be coming from, Is it because of this line??
imgSourceList.Add(new ImageToSet { imageData = ImageSource.FromStream(() => new MemoryStream(ms.ToArray())) });
Thanks in advance