Skip to content

Commit bd619b8

Browse files
committed
Merge pull request #106133 from fLindahl/stringname_movable_dict_fix
[.NET] Avoid heap alloc when using StringNames as key in a Dictionary
2 parents e36632a + 01056f3 commit bd619b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public override bool Equals([NotNullWhen(true)] object? obj)
161161

162162
public override int GetHashCode()
163163
{
164-
return NativeValue.GetHashCode();
164+
return NativeValue.DangerousSelfRef.GetHashCode();
165165
}
166166
}
167167
}

0 commit comments

Comments
 (0)