[everything] Fix circular shared pointer references.
We had a cycle from transaction_manager <-> space_map, and also from the ref_counters back up to the tm. This prevented objects being destroyed when various programs exited. From now on we'll try and only use a shared ptr if ownership is implied. Otherwise a reference will be used (eg, for up pointers).
This commit is contained in:
@@ -75,7 +75,7 @@ namespace {
|
||||
transaction_manager::ptr tm = open_tm(bm);
|
||||
|
||||
superblock_detail::superblock sb = read_superblock(bm);
|
||||
mapping_tree mtree(tm, sb.data_mapping_root_,
|
||||
mapping_tree mtree(*tm, sb.data_mapping_root_,
|
||||
mapping_tree_detail::block_traits::ref_counter(tm->get_sm()));
|
||||
|
||||
btree_visit_values(mtree, rv, dv);
|
||||
|
Reference in New Issue
Block a user