Remove the first reference from the service definition.
myServiceDefinition->RemoveReference () ;
Destroy the TRequestReceiverStream instance or instances.
Once the request receiver stream is destroyed, clients that try to communicate with the server receive an exception.
NOTE
Deleting the service definition alone does not terminate a server. When you delete a service definition, no new clients can connect to that service, but existing clients continue their connection until the last TRequestReceiverStream is destroyed.