Browse Source

Merge pull request #106133 from fLindahl/stringname_movable_dict_fix

[.NET] Avoid heap alloc when using StringNames as key in a Dictionary
Thaddeus Crews 4 months ago
parent
commit
bd619b8d32
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs

+ 1 - 1
modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs

@@ -161,7 +161,7 @@ namespace Godot
 
         public override int GetHashCode()
         {
-            return NativeValue.GetHashCode();
+            return NativeValue.DangerousSelfRef.GetHashCode();
         }
     }
 }