internal void Destroy() { if (Address != IntPtr.Zero) { Native_UStruct.DestroyStruct(structAddress, Address, 1); if (selfAllocated) { FMemory.Free(Address); } Address = IntPtr.Zero; initialized = false; selfAllocated = false; } }
/// <summary> /// Destroy a struct in memory. This may be done by calling the native destructor and then the constructor or individually reinitializing properties /// </summary> /// <param name="dest">Pointer to memory to destory</param> /// <param name="arrayDim">Number of elements in the array</param> public void DestroyStruct(IntPtr dest, int arrayDim) { Native_UStruct.DestroyStruct(Address, dest, arrayDim); }