示例#1
0
 private Dictionary(godot_dictionary nativeValueToOwn)
 {
     NativeValue = (godot_dictionary.movable)(nativeValueToOwn.IsAllocated ?
                                              nativeValueToOwn :
                                              NativeFuncs.godotsharp_dictionary_new());
     _weakReferenceToSelf = DisposablesTracker.RegisterDisposable(this);
 }
示例#2
0
 // Explicit name to make it very clear
 internal static Dictionary CreateTakingOwnershipOfDisposableValue(godot_dictionary nativeValueToOwn)
 => new Dictionary(nativeValueToOwn);