예제 #1
0
 public void CopyFrom(SharedPtrTheadSafe other)
 {
     ForceDecRef();
     ObjectPtr           = other.ObjectPtr;
     ReferenceController = other.ReferenceController;
     ForceIncRef();
 }
예제 #2
0
 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);
 }
예제 #3
0
        public static SharedPtrTheadSafe NonReferenceOwningSharedPtr(IntPtr nativeInstance)
        {
            SharedPtrTheadSafe result = new SharedPtrTheadSafe();

            result.OwnsAReference = false;
            result.NativeInstance = nativeInstance;
            return(result);
        }
예제 #4
0
        public static SharedPtrTheadSafe NewNulledSharedPtr(IntPtr nativeInstance)
        {
            SharedPtrTheadSafe result = new SharedPtrTheadSafe();

            result.NativeInstance      = nativeInstance;
            result.ObjectPtr           = IntPtr.Zero;
            result.ReferenceController = IntPtr.Zero;
            return(result);
        }
예제 #5
0
 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);
     }
 }
예제 #6
0
        private Text()
        {
            NativeInstance = Marshal.AllocHGlobal(NativeSize);

            Data = SharedPtrTheadSafe.NewNulledSharedPtr(NativeInstance);
        }
예제 #7
0
 internal Text(IntPtr nativeInstance)
 {
     NativeInstance = nativeInstance;
     OwnerObject    = null;
     Data           = new SharedPtrTheadSafe(nativeInstance);
 }