Commit c7575c2
fix: dispose SHA1 instance in Caching.hashString; use SHA1.HashData on .NET 5+
On netstandard2.0, SHA1.Create() returns a HashAlgorithm (IDisposable)
that was never disposed — a small but genuine resource leak.
On .NET 5+, use the static SHA1.HashData(byte[]) method which avoids
creating a disposable instance entirely and is the idiomatic modern API.
On netstandard2.0, wrap the instance in 'use' to ensure deterministic
disposal.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a1ee141 commit c7575c2
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
0 commit comments