Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Pool<T> to support Value types #147

Open
jkeon opened this issue Jun 6, 2023 · 2 comments
Open

Allow Pool<T> to support Value types #147

jkeon opened this issue Jun 6, 2023 · 2 comments

Comments

@jkeon
Copy link
Member

jkeon commented Jun 6, 2023

Sometimes you need a Pool<int>

@jkeon
Copy link
Member Author

jkeon commented Jun 6, 2023

Looks like all you have to do is change one line to support value types in Pool that defaults the acquired value to null

@mbaker3
Copy link
Member

mbaker3 commented Jun 6, 2023

While we're in here it would be nice to drop the foreach and just ask for the enumerator directly. It's clearer intent and you can avoid the initial default assignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants