Difference between revisions of "Advanced C++ Programming Tutorial 6"
From Chilipedia
(Created page with "Share your resources with style with stared_ptr. == Topics == === Part 1 === * Review of unique_ptr * shared_ptr usage scenarios * use_count * How to pass/receive resources w...") |
|||
Line 1: | Line 1: | ||
− | Share your resources with style with stared_ptr. | + | Share your resources with style with <code>stared_ptr</code>. |
== Topics == | == Topics == | ||
=== Part 1 === | === Part 1 === | ||
− | * Review of unique_ptr | + | * Review of <code>unique_ptr</code> |
− | * shared_ptr usage scenarios | + | * <code>shared_ptr</code> usage scenarios |
− | * use_count | + | * <code>use_count</code> |
− | * How to pass/receive resources when shared_ptr is involved | + | * How to pass/receive resources when <code>shared_ptr</code> is involved |
− | * Conversion from unique_ptr | + | * Conversion from <code>unique_ptr</code> |
− | * Custom deleter for shared_ptr | + | * Custom deleter for <code>shared_ptr</code> |
=== Part 2 === | === Part 2 === | ||
Stay Tuned! | Stay Tuned! |
Revision as of 23:15, 2 November 2019
Share your resources with style with stared_ptr
.
Topics
Part 1
- Review of
unique_ptr
-
shared_ptr
usage scenarios -
use_count
- How to pass/receive resources when
shared_ptr
is involved - Conversion from
unique_ptr
- Custom deleter for
shared_ptr
Part 2
Stay Tuned!
Video Timestamp Index
Homework
Part 1
Identify targets in the Memefighter codebase from Intermediate c++ for resource sharing, implement the sharing with std::shared_ptr, and consider/discuss potential downsides to the resource sharing for each instance.