UnsafeUtility.MemSwap(void*,void*,ulong)

Parameters

ptr1 Pointer to the first memory buffer.
ptr2 Pointer to the second memory buffer to swap the first one with.
size Number of bytes to swap.

Description

Swap the content of two memory buffers of the same size.

MemSwap copies the data when ptr1 and ptr2 buffers overlap, with the content of ptr1 in the overlapped region.


Did you find this page useful? Please give it a rating: