Skip to content
Discussion options

You must be logged in to vote

Here's the existing discussion on a defer statement: #513

IMO, returning a leased resource falls under resource disposal. It's not difficult to create an adapter to ArrayPool<T> that would allow you to lease a buffer in a using block via extension method.

SharpLab

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simon-curtis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants