Say we have the following class in client app:
public class TestClass
{
public void CallWCFService()
{
WCFClient svcClient = new WCFClient("endpointName");
var x = svcClient.GetFoo();
// no Close() or Abort() method here...
}
}
What happens if I create an instance of TestClass
from a different class, and call it's CallWCFService()
method?
Does garbage collection take care of the svcClient?
Does this mean that the service host have an unavailable channel until svcClient eventually dies somehow?