Suppose I have the code:
void Method1() {
Bitmap bitmap1;
foreach (string name in OpenFileDialog1.FileNames) {
bitmap1 = new Bitmap(name);
... // process bitmap
bitmap1.Dispose();
}
}
Is Dispose() necessary inside the loop?