-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid calling cleanup from destructor (#168)
## Context Neurodamus used to ensure `cleanup` was called by calling it from the destructor of the `Neurodamus` class. However, depending on the python version, this could lead to crashes as some objects from `Node` eventually were already destroyed. To workaround this problem, at some point we introduced the `cleanup_atexit` parameter which would skip over this procedure, and notably multiscale_run was using it. However this was not a solution as cleanup was not being called. ## Scope This PR fixes this long standing issue. Cleanup is now called directly from the top-level `run()` function. It can still be avoided if the user really wants to keep the data, with the parameter `cleanup=False` ## Testing CI is happy. ## Review * [x] PR description is complete * [x] Coding style (imports, function length, New functions, classes or files) are good
- Loading branch information
1 parent
dd59eef
commit 827ffd1
Showing
2 changed files
with
32 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters