2
Answers

clean up resource in HttpListenerContext

George George

George George

16y
2.3k
1

Hello everyone,


I currently clean-up resource in an HttpListenerContext instance in this way.

- Get Request.InputStream, and Close it;
- Get Response.OutputStream, and Close it.

My question is,

Is it the correct way to clean-up resouces? Since I did not fonud a Dispose or Close method for this class. Are there any more elegant way to clean-up resouce for HttpListenerContext?


thanks in advance,
George

Answers (2)