CryptoStream.Dispose(Boolean) メソッド
定義
CryptoStream によって使用されているアンマネージド リソースを解放し、オプションでマネージド リソースも解放します。Releases the unmanaged resources used by the CryptoStream and optionally releases the managed resources.
protected:
override void Dispose(bool disposing);
protected:
virtual void Dispose(bool disposing);
protected override void Dispose (bool disposing);
protected virtual void Dispose (bool disposing);
override this.Dispose : bool -> unit
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overrides Sub Dispose (disposing As Boolean)
Protected Overridable Sub Dispose (disposing As Boolean)
パラメーター
- disposing
- Boolean
マネージド リソースとアンマネージド リソースの両方を解放する場合は true
。アンマネージド リソースだけを解放する場合は false
。true
to release both managed and unmanaged resources; false
to release only unmanaged resources.
注釈
このメソッドは、パブリックな Dispose()
メソッドと Finalize
メソッドによって呼び出されます。This method is called by the public Dispose()
method and the Finalize
method. Dispose()
は、disposing パラメーターを Dispose(Boolean)
に設定して、protected true
メソッドを呼び出します。Dispose()
invokes the protected Dispose(Boolean)
method with the disposing parameter set to true
. Finalize
は、disposing を Dispose
に設定して false
を呼び出します。Finalize
invokes Dispose
with disposing set to false
.
disposing
パラメーターが true
の場合、このメソッドは、この CryptoStream が参照しているすべてのマネージド オブジェクトによって保持されているリソースをすべて解放します。When the disposing
parameter is true
, this method releases all resources held by any managed objects that this CryptoStream references. このメソッドは、参照される各オブジェクトの Dispose()
メソッドを呼び出します。This method invokes the Dispose()
method of each referenced object.
注意 (継承者)
Dispose
は、他のオブジェクトから複数回呼び出すことができます。
Dispose
can be called multiple times by other objects. をオーバーライドする場合 Dispose(Boolean)
は、以前にを呼び出したときに破棄されたオブジェクトを参照しないように注意して Dispose
ください。When overriding Dispose(Boolean)
, be careful not to reference objects that have been previously disposed in an earlier call to Dispose
. を実装する方法の詳細については Dispose(Boolean)
、「 [Dispose メソッドの実装](/dotnet/standard/garbage-collection/implementing-dispose)」を参照してください。For more information about how to implement Dispose(Boolean)
, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
およびの詳細について Dispose
Finalize
は、「 アンマネージリソースのクリーンアップ」を参照してください。For more information about Dispose
and Finalize
, see Cleaning Up Unmanaged Resources.