Sorry a newbiw question here. Hope no one minds as its probably a simple question?.
I have searched Google and cant find the answer anywhere, but then again I maybe looking at the wrong things ....
I have the following code in my Application:
void cam_NewFrame(object sender, NewFrameEventArgs eventArgs)
Bitmap bit = (Bitmap)eventArgs.Frame.Clone();
picWebCam.Image = bit;
I need to call 'bit.dispose();' from 'void cam_NewFrame' but from within:
private void btnStop_Click(object sender, EventArgs e)
Obviously this isnt working as its in a different class(?)?
How can i call bit.dispose from my btnStop?