Packt

Practical Guide to Mastering C++ Smart Pointers - Part 02

Économisez sur les compétences qui vous font briller avec 40 % de réduction sur 3 mois de Coursera Plus. Économisez maintenant

Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Packt

Practical Guide to Mastering C++ Smart Pointers - Part 02

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

8 heures à compléter
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

8 heures à compléter
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Master std::shared_ptr concepts including reference counting, ownership semantics, and memory lifecycle management in modern C++ applications.

  • Replace raw pointers with smart pointers to prevent memory leaks, dangling pointers, and resource mismanagement in complex systems.

  • Implement advanced smart pointer techniques including custom deleters, control blocks, and cross-library resource handling.

  • Use std::weak_ptr and std::make_shared to manage shared ownership, break cyclic dependencies, and optimize memory allocation.

Compétences que vous acquerrez

  • Catégorie : Memory Management
  • Catégorie : File I/O
  • Catégorie : Debugging
  • Catégorie : System Programming
  • Catégorie : File Management
  • Catégorie : Object Oriented Programming (OOP)

Outils que vous découvrirez

  • Catégorie : C++ (Programming Language)
  • Catégorie : Objective-C (Programming Language)

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

avril 2026

Évaluations

8 devoirs

Enseigné en Anglais

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

 logos de Petrobras, TATA, Danone, Capgemini, P&G et L'Oreal

Il y a 7 modules dans ce cours

In this module, we will introduce the course and outline the learning journey for mastering C++ smart pointers. You will gain an overview of the concepts and practical topics that will be explored throughout the course. This section prepares you for deeper learning by explaining the objectives and real-world relevance of smart pointers.

Inclus

1 vidéo1 lecture

In this module, we will explore the fundamental concepts of std::shared_ptr and its role in modern C++ programming. You will learn how shared ownership works through reference counting and practical coding examples. The section also covers how std::shared_ptr behaves when copied, returned from functions, or passed as arguments.

Inclus

8 vidéos1 devoir

In this module, we will examine the problems associated with raw pointers and how std::shared_ptr provides safer alternatives. You will learn how to prevent memory leaks, dangling pointers, and uninitialized pointer issues. The section also demonstrates real-world usage in containers, polymorphism, and multithreaded applications.

Inclus

10 vidéos1 devoir

In this module, we will dive into practical applications of std::shared_ptr for real-world resource management. You will explore control blocks, custom deleters, and advanced memory management mechanisms. The section also demonstrates how to safely manage system resources like file handles, DLLs, and OS-level objects.

Inclus

10 vidéos1 devoir

In this module, we will explore the internal workings of custom deleters and how they integrate with std::shared_ptr. You will learn how smart pointers behave across DLL boundaries and different runtime environments. This section also explains advanced scenarios involving C runtime libraries and cross-module resource management.

Inclus

7 vidéos1 devoir

In this module, we will explore the efficient construction of shared pointers using std::make_shared. You will learn how it improves memory allocation and simplifies object creation compared to traditional methods. The section also examines control block layout and memory optimization techniques.

Inclus

9 vidéos1 devoir

In this module, we will explore the role of std::weak_ptr in managing shared resources without owning them. You will learn how weak pointers help avoid cyclic dependencies and enable temporary access to shared objects. The section also demonstrates advanced patterns combining std::shared_ptr, std::weak_ptr, and std::make_shared for robust memory management.

Inclus

18 vidéos3 devoirs

Instructeur

Packt - Course Instructors
Packt
1 857 Cours514 430 apprenants

Offert par

Packt

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.

Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’

Jennifer J.

Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’

Larry W.

Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’

Chaitanya A.

’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’

Foire Aux Questions