[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:
@ -56,10 +56,9 @@ namespace caching {
|
||||
class hint_array {
|
||||
public:
|
||||
typedef boost::shared_ptr<hint_array> ptr;
|
||||
typedef persistent_data::transaction_manager::ptr tm_ptr;
|
||||
|
||||
hint_array(tm_ptr tm, unsigned width);
|
||||
hint_array(tm_ptr tm, unsigned width, block_address root, unsigned nr_entries);
|
||||
hint_array(transaction_manager &tm, unsigned width);
|
||||
hint_array(transaction_manager &tm, unsigned width, block_address root, unsigned nr_entries);
|
||||
|
||||
unsigned get_nr_entries() const;
|
||||
|
||||
|
Reference in New Issue
Block a user