Rediger

Del via


PeerNameRegistration.Dispose Method

Definition

Releases the resources used by the PeerNameRegistration object.

Overloads

Dispose()

Releases all resources used by the PeerNameRegistration object.

Dispose(Boolean)

Releases the unmanaged resources and optionally releases the managed resources used by the PeerNameRegistration object.

Remarks

When a peer leaves a Cloud, the cloud no longer requires the PeerNameRegistration object associated with the peer. Whether the registration object is stopped or disposed is dependent upon whether the cloud will reuse the object to register this peer or another peer. If there are any other endpoint(s) within the registration object with which the peer host expected to communicate, registering those endpoints within the cloud must occur before stopping or disposing of this object.

If the cloud expects to register more peers, the Stop method is recommended; when the cloud no longer needs the memory, it should be returned to the operating system via the Dispose method.

Dispose()

Releases all resources used by the PeerNameRegistration object.

public:
 virtual void Dispose();
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

Implements

Notes to Callers

Always call the Dispose method before destroying the PeerNameRegistration object.

Applies to

Dispose(Boolean)

Releases the unmanaged resources and optionally releases the managed resources used by the PeerNameRegistration object.

protected:
 virtual void Dispose(bool disposing);
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable Sub Dispose (disposing As Boolean)

Parameters

disposing
Boolean

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Notes to Callers

Always call the Dispose method before releasing the last reference to the PeerNameRegistration object.

Applies to