Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
C++ internals for software engineer role
·
Module 4
Resource Management and the RAII Idiom
1
RAII: Resource Management in C++
Explain the RAII (Resource Acquisition Is Initialization) principle as a core C++ idiom.
2
RAII File Wrapper
Implement a simple RAII wrapper for a file handle to ensure cleanup upon scope exit.
3
Stack Unwinding and RAII in Exception Handling
Analyze stack unwinding during exception handling and how it enables RAII.
4
`std::unique_ptr`: Exclusive Ownership and Move Semantics
Use `std::unique_ptr` for exclusive ownership and explain its move-only semantics.
Shared Pointers: Ownership & Control Blocks
Use `std::shared_ptr` for shared ownership and analyze its internal control block structure.
6
Implementing a Reference-Counted Smart Pointer
Implement a basic reference-counted smart pointer to understand the shared ownership mechanism.
7
Breaking Circular References with `std::weak_ptr`
Use `std::weak_ptr` to break circular references involving `std::shared_ptr`.
8
Modernizing C++: From Raw Pointers to Smart Pointers
Refactor C-style code using raw pointers and manual memory management to modern C++ using smart pointers.
Previous module
Runtime Polymorphism Internals
Next module
Compile-Time Polymorphism with Templates