-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better grid handling for the Plain Context
Plain now uses a global BTreeMap for holding Arc<dyn Grid>, and hands out Arc::clone()s to Ops needing access. This means that all uses of a grid refers to the same heap allocation. Unfortunately, we need to keep the "original" instantiation in the list, so the Arcs will never be fully released. To mitigate this, we empty the BTreeMap every time a new Plain is instantiated. While not ideal, it limits the risk of hanging on to needless heap allocations
- Loading branch information
1 parent
d960b4d
commit e00cb39
Showing
2 changed files
with
42 additions
and
11 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