PeerNameRegistration.Dispose Method

 

Releases the resources used by the PeerNameRegistration object.

Namespace:   System.Net.PeerToPeer
Assembly:  System.Net (in System.Net.dll)

NameDescription
System_CAPS_pubmethodDispose()

Releases all resources used by the PeerNameRegistration object.

System_CAPS_protmethodDispose(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.

Return to top
Show: