
Master C++ pointers and smart pointers in a two-part course (about 1.5 hours) covering memory management, stack and heap memory, and unique_ptr, shared_ptr, weak_ptr, and custom deleters.
Learn how C++ pointers store the address of a variable, declare pointer types, and use the address-of operator to access memory addresses and dereference values.
Explore how pointers traverse memory by element size across int, char, long, and double, and how pointer arithmetic and printing depend on system architecture and type sizes.
Explore pointer to pointer in C++ by examining how a pointer stores the address of another pointer, dereferencing twice to reach an int value in memory.
Learn to access values via pointers by using the dereferencing operator to read the variable stored at an address, including multi-level pointers and pointers to pointers.
Explore c++ pointers and arrays by using a pointer to the first element to traverse an int array, incrementing the pointer to print addresses and illustrate modifiable versus non-modifiable pointers.
Explore how character pointers differ from other pointers, how string literals are stored as character sequences with a terminating null, and how casting and initialization affect printing and addresses.
Discover how memory is organized into static/global, stack, and heap. Learn dynamic memory allocation with malloc, calloc, realloc, and new/delete, and how to avoid leaks and stack overflow.
Explore why smart pointers matter in C++, showing how unique_ptr enforces unique ownership and can be moved, while another smart pointer lets multiple copies with automatic resource destruction.
Explore unique pointers, a smart pointer type that cannot be copied to ensure exclusive ownership, and learn to transfer ownership via move semantics through a structure example including memory.
Learn how unique pointers handle dynamic arrays in C++, ensure proper deletion to prevent memory leaks, and examine constructor, destructor behavior and operator support when using unique pointers.
Understand how shared_ptr implements shared ownership by reference counting, allowing multiple pointers to refer to the same object and automatically destroying it when the count drops to zero.
Explore how smart pointers prevent memory leaks by using unique_ptr with custom deleters, including lambdas, and how this approach compares to raw new and delete when managing arrays.
Explore how weak_ptr provides a non owning reference to a shared resource, avoiding cycles and memory leaks while preserving safe destruction.
Define custom deleters for smart pointers to perform resource cleanup beyond simple delete, using function pointers, lambdas, or a deleter class with unique_ptr or shared_ptr.
Master unique pointers, shared pointers, and weak pointers, learn how to create and destroy them, decide when to use each type, while defining our custom abilities for smart pointers.
Pointers are one of the most fundamental and powerful concepts in C and C++ programming. This course starts with C/C++ pointers and in second part of the course it covers Smart pointers concepts.
Smart pointers in C++ are template classes that ensure memory and other resources are managed efficiently. Smart pointers are a key component of C++ resource management and a valuable skill for any developer. In this course, Abhishek Kumar explains different types of Smart Pointers and how to use those. You can choose the right smart pointer for your programming needs.