Пример #1
0
 public static void InternString(NativeString str)
 {
     Console.WriteLine($"InternString :: {str.GetHashCode():X}");
     if (literalStorage.Any(x => x.GetHashCode() == str.GetHashCode()))
     {
         return;
     }
     if (literalStorage.Contains(str))
     {
         return;
     }
     literalStorage.Add(str);
     GC.KeepAlive(str);
 }
Пример #2
0
 public static void InternString(NativeString str)
 {
     literalStorage.Add(str);
     GC.KeepAlive(str);
 }