Skip to content

Commit

Permalink
fix: Added missing Dispose() call to HashCode.cs.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV authored Mar 8, 2023
1 parent ee0587e commit 638eeb0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ private static unsafe uint GenerateGlobalSeed()
{
byte[] bytes = new byte[4];

RandomNumberGenerator.Create().GetBytes(bytes);
using (var generator = RandomNumberGenerator.Create())
{
generator.GetBytes(bytes);
}

return BitConverter.ToUInt32(bytes, 0);
}
Expand Down Expand Up @@ -182,4 +185,4 @@ private static uint RotateLeft(uint value, int offset)
{
return (value << offset) | (value >> (32 - offset));
}
}
}

0 comments on commit 638eeb0

Please sign in to comment.