We have a contract transferring a large object using streaming. Service contracts and messages come down to something like this.
[ServiceContract]
public interface IData
{
[OperationContract]
Item Get(ItemRequest request);
[OperationContract]
void Put(Item request);
}
[MessageContract]
public class Item: IDisposable
{
[MessageBodyMember(Order = 1)]
public Stream FileByteStream;
public void Dispose() {...}
}
The Item class provides a standard implementation of a one-time template. My question is: WCF calls the Dispose method of the Item class. WCF through ServiceHost basically assumes responsibility for the transfer and receipt of the Item object from our service contract.
There are many examples on the Internet (like this ), but none of them ever calls recycling or mentioning if this happens.
source
share