語言

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

要清除的區塊大小(以位元組為單位)。

屬性

備註

若此方法被呼叫為 ptr 且 nullbyteCount 為 0,則等價於一個 no-op。

當 ptr 和 nullbyteCount 大於 時 0 的行為則未定義。

適用於