I am currently working with Monotouch. I have an application which opens the camera and then needs to process the image that is currently being captured. I am using code which is very similar to https://github.com/reinforce-lab/com.ReinforceLab.MonoTouch.Controls/tree/master/VideoCaptureSample/
The difference of interest between my code and theirs is that in OverlayView.cs which is placed over my UIImagePickerController however, I have the following code:
using (var screenImage = CGImage.ScreenImage.WithImageInRect(Frame))
{
_imageView = UIImage.FromImage(screenImage);
Bitmap srcbitmap = new System.Drawing.Bitmap(_imageView);
}
However running this code will cause memory to continuously fill up until the application closes. It seems as though the System.Drawing.Bitmap is never disposed of. I am using ZXing.monotouch so I need the bitmap so that I can create a bytes[] of the bitmap to pass into an RGBLuminanceSource
Any ideas on how I can get this to play nicely?