22#include "mythsharedptr.h"
23#include "private/os/threads/atomic.h"
29shared_ptr_base::shared_ptr_base()
33shared_ptr_base::~shared_ptr_base()
44 if (pc != NULL && (pc->load() == 0 || pc->add_fetch(1) < 2))
54 if (pc != NULL && (pc->load() == 0 || pc->add_fetch(1) < 2))
60bool shared_ptr_base::clear_counter()
62 if (pc != NULL && pc->load() > 0 && pc->sub_fetch(1) == 0)
75void shared_ptr_base::reset_counter()
88 pc =
new OS::Atomic(1);
99int shared_ptr_base::get_count()
const
101 return (pc != NULL ? pc->load() : 0);
This is the main namespace that encloses all public classes.