You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: