Sharing ownership with smart pointers

Some ownership relationships are not as straightforward as type A owns B. Sometimes, an entire group of types owns another type. To handle this, we need another smart pointer that behaves mostly like Box but only deletes the underlying resource if no one needs it anymore, it is Rc, which stands for Reference Counted.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.137.7