Bagikan melalui


ThreadPoolBoundHandle.FreeNativeOverlapped(NativeOverlapped*) Metode

Definisi

Penting

API ini bukan kompatibel CLS.

Membebaskan memori yang terkait dengan struktur yang NativeOverlapped dialokasikan oleh AllocateNativeOverlapped metode .

public:
 void FreeNativeOverlapped(System::Threading::NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
public void FreeNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public void FreeNativeOverlapped (System.Threading.NativeOverlapped* overlapped);
[<System.CLSCompliant(false)>]
member this.FreeNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> unit
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
member this.FreeNativeOverlapped : nativeptr<System.Threading.NativeOverlapped> -> unit

Parameter

overlapped
NativeOverlapped*

Penunjuk tidak terkelola ke struktur yang NativeOverlapped akan dibebaskan.

Atribut

Pengecualian

overlappedadalah null.

Metode ini dipanggil setelah ThreadPoolBoundHandle objek dibuang.

Keterangan

Perhatian

Anda harus memanggil FreeNativeOverlapped metode tepat sekali pada setiap NativeOverlapped pointer yang tidak dikelola yang dialokasikan dengan menggunakan AllocateNativeOverlapped metode . Jika Anda tidak memanggil FreeNativeOverlapped metode , Anda akan membocorkan memori. Jika Anda memanggil FreeNativeOverlapped metode lebih dari sekali pada penunjuk yang tidak dikelola yang sama NativeOverlapped , memori akan rusak.

Berlaku untuk