Azure / Azure/azure-functions-sql-extension
Automatically Call DisposeAsync
Open
enhancement
- Dominant language
- C#
- Stars
- 130
- Forks
- 71
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 4
Description
It's unsafe to rely on a user calling [`DisposeAsync`](https://github.com/Azure/azure-functions-sql-extension/blob/a2a8da1bc448321f1adfe64c7c7ffdc54f6c3238/src/SqlAsyncEnumerable.cs#L77) once they're done using the enumerator exposed by `SqlAsyncEnumerable`. If they do not call it, the `SqlConnection` and `SqlDataReader` will remain open, leaking resources. Ideally, we should find a way to have this method be called automatically once the user's function exits.
Contributor guide
Assessment
This issue has not been assessed yet.