I have this:
Bitmap bmp = new Bitmap(image);
//image processing
bmp.Save(path + fileName);
and I want to know if I need to call bmp.Dispose()
after this code.
Thanks in advance.
I would use using
block and Path.Combine
using(var bmp = new Bitmap(image))
{
// image processing
bmp.Save(Path.Combine(path ,fileName));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With