NativeMemory.Clear(Void*, UIntPtr) 方法

定义

重要

此 API 不符合 CLS。

清除内存块。

public:
 static void Clear(void* ptr, UIntPtr byteCount);
[System.CLSCompliant(false)]
public static void Clear(void* ptr, UIntPtr byteCount);
[<System.CLSCompliant(false)>]
static member Clear : nativeptr<unit> * unativeint -> unit

参数

ptr
Void*

指向应清除的内存块的指针。

byteCount
UIntPtr

unativeint

要清除的块的大小(以字节为单位)。

属性

注解

如果使用 be 和 byteCount be null0调用ptr此方法,则它将等效于 no-op。

当行为nullbyteCount0大于未定义时ptr的行为。

适用于