J
Just Me
I've been disposing whenever I create a bitmap or graphics object.
Recently I developed a bug which turned out to be as follows:
bmp=new Bitmap(...
picBox.Image = bmp
..
..
bmp.dispose
exit sub
Now I can see that Image is pointing to a disposed bitmap.
But if I don't will picturebox dispose the bitmap assigned to Image?
Do I have to assign to Image or can I just draw on it.
What happens if I never dispose of my Graphic or Bitmap objects?
Thanks in advance for any answers
Recently I developed a bug which turned out to be as follows:
bmp=new Bitmap(...
picBox.Image = bmp
..
..
bmp.dispose
exit sub
Now I can see that Image is pointing to a disposed bitmap.
But if I don't will picturebox dispose the bitmap assigned to Image?
Do I have to assign to Image or can I just draw on it.
What happens if I never dispose of my Graphic or Bitmap objects?
Thanks in advance for any answers