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

Access After Close #67

Open
Aidan63 opened this issue Apr 5, 2024 · 0 comments
Open

Access After Close #67

Aidan63 opened this issue Apr 5, 2024 · 0 comments
Labels

Comments

@Aidan63
Copy link
Owner

Aidan63 commented Apr 5, 2024

Are we defining behaviour for what should happen if a user attempts to call a function / read or write a property of a class after close has been called? I hadn't though of this until the other week so I'm not sure what the current behaviour is, but its probably not great and is certainly untested. In C# objects which implement IDisposable are recommended to throw ObjectDisposedException if users call functions or access properties after dispose has been called. So maybe we should specify a ObjectClosedException will be thrown when accessing properties or returned as the error in callback functions.
If we don't specify a behaviour I can easily imagine a world where this falls into the "target specific behaviour category" as some implementations might cache values and be accessible after closing but cause exceptions on other targets.

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

No branches or pull requests

1 participant