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

[hal] Check for invalid handle before closing handles #7016

Merged
merged 9 commits into from
Sep 7, 2024

Conversation

rzblue
Copy link
Member

@rzblue rzblue commented Aug 30, 2024

Closes #6991

Adds a close function pointer template parameter to hal::Handle- this allowed default destructors in many places.
The status parameter has been removed from close functions- in most places it was not used. Where it was, an error is printed in stead.
JNI functions also check for invalid handle- though now that i'm thining about it, I'm not sure this is really necessary. It's easy enough to remove.

@PeterJohnson PeterJohnson merged commit 496e7c1 into wpilibsuite:main Sep 7, 2024
35 checks passed
@rzblue rzblue deleted the free-handles branch September 9, 2024 05:20
rzblue added a commit to rzblue/allwpilib that referenced this pull request Oct 16, 2024
This was overlooked by mistake in wpilibsuite#7016
rzblue added a commit to rzblue/allwpilib that referenced this pull request Oct 16, 2024
This was overlooked by mistake in wpilibsuite#7016
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

Successfully merging this pull request may close these issues.

[wpilibc] Check for invalid handles in destructors
4 participants