Change shutdown behavior to allow graceful handle leaks.
This avoids crashing in case of any handle references left-over in GC allocated memory that gets finalized after module destructors have already been run.
This commit is contained in:
parent
38a4e4ca5f
commit
e2e8bf30aa
7 changed files with 96 additions and 13 deletions
|
@ -52,8 +52,13 @@ interface EventDriver {
|
|||
/// Directory change watching
|
||||
@property inout(EventDriverWatchers) watchers() inout;
|
||||
|
||||
/// Releases all resources associated with the driver
|
||||
void dispose();
|
||||
/** Releases all resources associated with the driver.
|
||||
|
||||
In case of any left-over referenced handles, this function returns
|
||||
`false` and does not free any resources. It may choose to free the
|
||||
resources once the last handle gets dereferenced.
|
||||
*/
|
||||
bool dispose();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue