mirror of
https://github.com/CommunityToolkit/dotnet.git
synced 2026-10-19 21:56:59 +08:00
Add missing Dispose() call to HashCode
This commit is contained in:
committed by
Sergio Pedri
parent
ee0587ebf9
commit
e571eb3050
@@ -35,7 +35,10 @@ internal struct HashCode
|
||||
{
|
||||
byte[] bytes = new byte[4];
|
||||
|
||||
RandomNumberGenerator.Create().GetBytes(bytes);
|
||||
using (RandomNumberGenerator generator = RandomNumberGenerator.Create())
|
||||
{
|
||||
generator.GetBytes(bytes);
|
||||
}
|
||||
|
||||
return BitConverter.ToUInt32(bytes, 0);
|
||||
}
|
||||
@@ -182,4 +185,4 @@ internal struct HashCode
|
||||
{
|
||||
return (value << offset) | (value >> (32 - offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user