I\'m developing an application in C#, and I developed a library that does some stuff with Aforge
cameras. One of the points is to simply capture images of what is i
AForge owns the bytes of the image, you should make your own deep copy. Passing the frame to the Bitmap constructor is not enough. If the framework is not able to properly dispose the bitmap because you have a reference to it, there's a leak.
Try with this:
private void NewFrame(object sender, NewFrameEventArgs args)
{
Bitmap newFrame = AForge.Imaging.Image.Clone(args.Frame);
PictureBox.FromBitmapImage(newFrame);
newFrame.Dispose();
}