We have atomic access to shared_ptrs but I cannot see how to atomically reset them: what am I missing?
You can just use atomic_exchange with a default constructed shared_ptr:
atomic_exchange(&ptr, {});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With