Image cannot be deleted after loading and disposing

Dear Mario, dear GemBox team,

I receive the following exception in the “File.Delete(path)” line:

The process cannot access the file X because it is being used by another process.

using (var image = Image.Load(path))
{
    image.Save(newPath);
}
File.Delete(path);

How can I ensure that all resources of the image are released?
I am using ASP.NET Core 7.0 (Blazor Server) on Windows 10 with GemBox Imaging 10.0.1147.
It crashes also when newPath and path are identical
or when I comment out image.Save(…).

Thanks and best regards,
Thomas

Interestingly it works without any error when running the Blazor Server app on a Debian server.

Hi Thomas,

Please try again with this bugfix version:

Install-Package GemBox.Imaging -Version 10.0.1158-hotfix

Does this solve your issue?

Regards,
Mario

Thanks, Mario!
The issue has been resolved using your hotfix!
Thanks a lot and best regards,
Thomas