Skip to content

Commit

Permalink
Perf | avoid copying of an array for SqlGuid in TdsParser
Browse files Browse the repository at this point in the history
similar how it's don for netfx
  • Loading branch information
wilbit committed Jan 19, 2024
1 parent 00db92d commit 33821bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5932,7 +5932,7 @@ internal bool DeserializeUnencryptedValue(SqlBuffer value, byte[] unencryptedByt
case TdsEnums.SQLUNIQUEID:
{
Debug.Assert(length == 16, "invalid length for SqlGuid type!");
value.SqlGuid = new SqlGuid(unencryptedBytes); // doesn't copy the byte array
value.SqlGuid = SqlTypeWorkarounds.SqlGuidCtor(unencryptedBytes, true); // doesn't copy the byte array
break;
}

Expand Down

0 comments on commit 33821bc

Please sign in to comment.