This repository was archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Dispose IDisposable objects in ObjectResult, FileStreamResult and others in exceptional cases #1331
Comments
Reactivating this bug as we also need to handle the scenario where in case of exceptions we need to make sure to dispose |
It's also possible for a filter to change the result and 'hide' the response we created. We need a robust solution for this. |
Strawman design: Include all objects that needs disposing on the Response/Request and dispose them with the request unwinds (or when exiting MVC).
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Scenario:
Users typically do the following in Web API. Here the expectation is that the file stream would be closed after the content from the file has been read and written out.
The text was updated successfully, but these errors were encountered: