UdpSingleSourceMulticastClient.Dispose 方法

定義

警告

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

離開多點傳送群組,並釋出目前的 UdpSingleSourceMulticastClient 類別執行個體和基礎 Socket 使用的所有資源。

public:
 virtual void Dispose();
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public void Dispose ();
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

實作

屬性

備註

Dispose 使用完畢時,請呼叫 UdpSingleSourceMulticastClientDispose 方法會將 UdpSingleSourceMulticastClient 保留在無法使用的狀態。 呼叫 Dispose之後,您必須釋放 的所有參考, UdpSingleSourceMulticastClient 讓垃圾收集行程可以回收佔用的 UdpSingleSourceMulticastClient 記憶體。

在您釋放最後一個 Dispose 參考之前,請務必呼叫 UdpSingleSourceMulticastClient。 否則工作窗格所使用的資源不會釋放,直到記憶體回收行程呼叫 UdpSingleSourceMulticastClient 物件的 Finalize 方法。

適用於