public void CopyFrom(SharedPtrTheadSafe other) { ForceDecRef(); ObjectPtr = other.ObjectPtr; ReferenceController = other.ReferenceController; ForceIncRef(); }
internal Text(UnrealObject owner, int propertyOffset) { OwnerObject = owner; CheckOwnerObject(); NativeInstance = IntPtr.Add(owner.NativeObject, propertyOffset); //Don't own a reference we're referring to a property Data = SharedPtrTheadSafe.NonReferenceOwningSharedPtr(NativeInstance); }
public static SharedPtrTheadSafe NonReferenceOwningSharedPtr(IntPtr nativeInstance) { SharedPtrTheadSafe result = new SharedPtrTheadSafe(); result.OwnsAReference = false; result.NativeInstance = nativeInstance; return(result); }
public static SharedPtrTheadSafe NewNulledSharedPtr(IntPtr nativeInstance) { SharedPtrTheadSafe result = new SharedPtrTheadSafe(); result.NativeInstance = nativeInstance; result.ObjectPtr = IntPtr.Zero; result.ReferenceController = IntPtr.Zero; return(result); }
internal Text(UnrealObject owner, IntPtr nativeBuffer) { OwnerObject = owner; CheckOwnerObject(); NativeInstance = nativeBuffer; //Don't own a reference we're referring to a property if (owner != null) { Data = SharedPtrTheadSafe.NonReferenceOwningSharedPtr(NativeInstance); } else { Data = new SharedPtrTheadSafe(NativeInstance); } }
private Text() { NativeInstance = Marshal.AllocHGlobal(NativeSize); Data = SharedPtrTheadSafe.NewNulledSharedPtr(NativeInstance); }
internal Text(IntPtr nativeInstance) { NativeInstance = nativeInstance; OwnerObject = null; Data = new SharedPtrTheadSafe(nativeInstance); }