Table of Contents

Method Clear

Namespace
Zyl.ExSpans
Assembly
ExSpans.dll

Clear(void*, nuint)

Clears a block of memory (清零内存块).

[CLSCompliant(false)]
public static void Clear(void* ptr, nuint byteCount)

Parameters

ptr void*

A pointer to the block of memory that should be cleared (指向应清零的内存块的指针).

byteCount nuint

The size, in bytes, of the block to clear (要清零的块的大小(以字节为单位)).

Remarks

If this method is called with ptr being null and byteCount being 0, it will be equivalent to a no-op (如果以 ptr 为 null 且 byteCount 为 0调用此方法,则该方法等效于 no-op).

The behavior when ptr is null and byteCount is greater than 0 is undefined (当 ptr 为 null 且 byteCount 大于 0 时的行为未定义).