-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
todoA feature that has been specified, but not yet implementedA feature that has been specified, but not yet implemented
Description
Because of the indeterminate static initialization order in C++, it is currently not safe to use Features as global variables.
Features relies on a a global hashmap in order to ensure that only one FeatureStore per process is opened for any given GOL. When a global Features object is destroyed, its associated FeatureStore is removed from this hashmap. However, since destruction order of globals is indeterminate, this hashmap may already have been destroyed, resulting in a crash.
To avoid this, we would need to wrap the hashmap in a class that maintains an "alive" flag (set to true by constructor, cleared by destructor). Once that flag is cleared, the hashmap must no longer be accessed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
todoA feature that has been specified, but not yet implementedA feature that has been specified, but not yet implemented