Image.Identify disposal #1938
-
Hello, I wasn't sure if this should be submitted as an issue or a discussion, so I'm starting with the later. We recently started using SixLabors.ImageSharp in our project, and there is some confusion about how Image.Identity handles IDisposable. The documentation indicates a using statement should be used when calling Image.Identify, but it doesn't appear IImageInfo implements IDisposable. Is this a typo? https://docs.sixlabors.com/articles/imagesharp/imageformats.html#metadata-only-decoding What the correct way to call Image.Identity to ensure resources are property disposed? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @JasonAtATL Yep, that's a mistake in the documentation, well spotted! I've created a PR in the docs to change this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the confirmation, @JimBobSquarePants! |
Beta Was this translation helpful? Give feedback.
Hi @JasonAtATL
Yep, that's a mistake in the documentation, well spotted!
IImageInfo
implementations don't require disposal.I've created a PR in the docs to change this.
SixLabors/docs#38