If I replace an image in a PictureBox control, should I dispose the original image first? .Net Winfo
- by Jules
Following on from my question here http://stackoverflow.com/questions/2548664/long-overdue-for-me-question-about-disposing-managed-objects-in-net-vb-net ,
If I replace an image in a picture box, should I dispose the original image first?
Or, what about this situation:
Dim bm As New Bitmap(32,32)
bm = New Bitmap(32,32)
bm = New Bitmap(32,32)
bm = New Bitmap(32,32)
Does bm need only to be disposed at the end, or should it be disposed before each re-creation?