I'm returning some images as a stream as part of a WebOperationContext.Current.CreateStreamResponse()
I was wondering if the framework handles the closing of this stream after it gets returned. Or if there was something that you have to do as part of the response in order to close the stream correctly.
Thanks.
Well, from what I found, CreateStreamResponse() returns a Message, which implements IDisposable, so it would be best practice to wrap your returned object in a
usingstatement. That should handle closing the stream properly.