Use std::shared_ptr/weak_ptr instead of boost