DEV Community

Discussion on: How a weak_ptr might prevent full memory cleanup of managed object

 
fenbf profile image
Bartlomiej Filipek

ech... and people say that C++ is a complex language :)
Rust also looks scary :)
Thanks for sharing

Thread Thread
 
timidger profile image
Preston Carpenter

Ha that's a direct link to the source (and that was just to show you the memory layout).

Here's a much more user-friendly view into the non-thread-safe version of shared_ptr (the thread safe version is called Arc):