Export (0) Print
Expand All

PeerNameRegistration.Dispose Method

Releases the resources used by the PeerNameRegistration object.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Dispose() Releases all resources used by the PeerNameRegistration object.
Protected method Dispose(Boolean) Releases the unmanaged resources and optionally releases the managed resources used by the PeerNameRegistration object.

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.

© 2015 Microsoft