-
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.
* Grid provider for Plain The GridCollection struct provides access to Arc<dyn Grid>, such that any grid needed by any Operator in any instantiation of Plain, always refer to the same heap allocation. * 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
32c2f06
commit 17d04f2
Showing
2 changed files
with
86 additions
and
20 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