AForge camera memory leak

后端 未结 3 875
遇见更好的自我
遇见更好的自我 2021-01-21 18:41

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

3条回答
  •  深忆病人
    2021-01-21 19:17

    This works for me.

            if (pictureBox1.Image != null) {
                pictureBox1.Image.Dispose();
            }
            Bitmap bitmap = eventArgs.Frame.Clone() as Bitmap;
            pictureBox1.Image = bitmap;
    

提交回复
热议问题