Skip to content

Avoid using unique_ptrs to mutable state

Although it may be less obvious at first sight, unique_ptr is as const-incorrect as shared_ptr, and thus as dangerous to use in a multi-threaded environment where a single component can be invoked by multiple threads.

Unfortunately, we currently can do less about it, because the current code needs mutability in a number of places. The geometry building is full of mutation, loggers are full of mutable state by definition, and unique_ptrs are also used for various kinds of cache objects which, by their very nature, must be mutable.

This merge request fixes ACTS-307.

Merge request reports

Loading