[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:
@ -49,10 +49,10 @@ namespace persistent_data {
|
||||
class bitset {
|
||||
public:
|
||||
typedef boost::shared_ptr<bitset> ptr;
|
||||
typedef persistent_data::transaction_manager::ptr tm_ptr;
|
||||
|
||||
bitset(tm_ptr tm);
|
||||
bitset(tm_ptr tm, block_address root, unsigned nr_bits);
|
||||
bitset(transaction_manager &tm);
|
||||
bitset(transaction_manager &tm,
|
||||
block_address root, unsigned nr_bits);
|
||||
block_address get_root() const;
|
||||
unsigned get_nr_bits() const;
|
||||
void grow(unsigned new_nr_bits, bool default_value);
|
||||
|
Reference in New Issue
Block a user