myServiceDefinition->RemoveReference () ;
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.