⚡ Build the skills to land top-paying quant jobs. Offer ends in 23d 14h 02m 21s23 days 14 hours 2 minutes 21 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 23d 14h 02m 21s23 days 14 hours 2 minutes 21 seconds.

Sign in to watch this lesson
Ownership Types, Views and Type Erasure · 3:24
A std::shared_ptr is two pointers: one to the object and one to a control block that counts owners. We watch the count rise and fall to zero, read the assembly clang generates for a copy (one atomic add) versus a move (none), break it with two control blocks from one raw pointer, and fix member functions with enable_shared_from_this.