Open Vandersteen opened 7 years ago
@Vandersteen probably this object is being created twice and not being disposed. This was pointed out on another issue here.
using (FastJavaByteArray buffer = new FastJavaByteArray(bufferSize))
{
// allocate new Java byte arrays for Android to use for preview frames
camera.AddCallbackBuffer(new FastJavaByteArray(bufferSize));
}
Try this:
using (FastJavaByteArray buffer = new FastJavaByteArray(bufferSize))
{
// allocate new Java byte arrays for Android to use for preview frames
camera.AddCallbackBuffer(buffer);
}
Using xamarin forms, I've implemented a custom renderer to show a camera preview in a tabbed page (snapchat like). When moving away from the page and back (a few times) I get a out of memory exception.
When the page is appearing the following gets called:
When the page dissappears:
The previewCallback:
Logs:
Am I missing something ?
Xamarin.Forms: 2.3.4