Let's say I have the following WCF implementation:
public Stream Download(string path)
{
FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read);
return stream;
}
Who's responsible for disposing the returned value? After all, a network failure might occur, hence the consumer might not be able to dispose it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…