Difference between revisions of "Advanced C++ Programming Tutorial 6"
From Chilipedia
(→Part 1) |
(→Part 1) |
||
| Line 19: | Line 19: | ||
== Homework == | == Homework == | ||
=== Part 1 === | === Part 1 === | ||
| − | Identify targets in the [https://github.com/planetchili/Inheritance Memefighter codebase from Intermediate c++] for resource sharing, implement the sharing with <code>std::shared_ptr</code>, and consider/discuss potential downsides to the resource sharing for each instance of resource sharing. | + | Identify targets in the [https://github.com/planetchili/Inheritance Memefighter codebase from Intermediate c++] for resource sharing, implement the sharing with <code>std::shared_ptr</code>, and consider/discuss potential downsides to the resource sharing for each instance of resource sharing. Solution can be found [https://youtu.be/N2CDksFB0Uk here]. |
== See also == | == See also == | ||
Revision as of 01:37, 7 November 2019
Share your resources in grand style with shared_ptr.
Topics
Part 1
- Review of
unique_ptr -
shared_ptrusage scenarios -
use_count - How to pass/receive resources when
shared_ptris involved - Comparing
shared_ptrs - Conversion from
unique_ptrtoshared_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 of resource sharing. Solution can be found here.