DocumentPageView.Dispose 方法

定義

釋放 DocumentPageView 所使用的所有資源。

protected:
 void Dispose();
protected void Dispose ();
member this.Dispose : unit -> unit
Protected Sub Dispose ()

備註

使用每個 DocumentPageView 實例完成之後呼叫 Dispose 。 呼叫 之後 Dispose ,會 DocumentPageView 針對垃圾收集釋出 ,而且應用程式不應再參考。 呼叫 Dispose 並釋放之後,垃圾收集行程可以回收 DocumentPageView 記憶體和資源。 如需詳細資訊,請參閱 清除 Unmanaged 資源實作 Dispose 方法

注意

一律呼叫 Dispose 作為釋放每個 DocumentPageView 實例的最終呼叫。 如果未 Dispose 呼叫 ,在垃圾收集行程稍後呼叫頁面檢視器的 Finalize 方法之前,將不會釋放所使用的資源 DocumentPageView

適用於

另請參閱