AsymmetricAlgorithm.Clear 方法

定义

释放 AsymmetricAlgorithm 类使用的所有资源。Releases all resources used by the AsymmetricAlgorithm class.

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

示例

下面的代码示例演示如何调用Clear方法来释放当前customCrypto对象的资源。The following code example demonstrates how to call the Clear method to release the resources of the current customCrypto object. 此代码示例是为AsymmetricAlgorithm类提供的更大示例的一部分。This code example is part of a larger example provided for the AsymmetricAlgorithm class.

customCryptoAlgorithm->Clear();
customCrypto.Clear();
customCrypto.Clear()

注解

此方法是对IDisposable.Dispose方法的简单调用。This method is a simple call to the IDisposable.Dispose method.

调用Dispose会允许为其他目的重新AsymmetricAlgorithm分配类使用的资源。Calling Dispose allows the resources used by the AsymmetricAlgorithm class to be reallocated for other purposes. 有关的详细信息Dispose,请参阅清理非托管资源For more information about Dispose, see Cleaning Up Unmanaged Resources.

适用于

另请参阅