Packt

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

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 01

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 the use of smart pointers like std::unique_ptr and std::shared_ptr in C++.

  • Implement advanced memory management techniques, including custom deleters and the PIMPL idiom.

  • Learn to efficiently use smart pointers in containers and handle reallocation scenarios.

  • Apply smart pointers in practical projects such as game development and object pools.

Compétences que vous acquerrez

  • CatĂ©gorie : Object Oriented Programming (OOP)
  • CatĂ©gorie : Memory Management
  • CatĂ©gorie : Software Design Patterns
  • CatĂ©gorie : Debugging

Outils que vous découvrirez

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

Détails à connaître

Certificat partageable

Ajouter Ă  votre profil LinkedIn

Récemment mis à jour !

avril 2026

Évaluations

12 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 11 modules dans ce cours

In this module, we will introduce the foundational concepts of smart pointers in C++. We will lay the groundwork for understanding the necessity of smart pointers and how they contribute to memory safety and resource management in C++ programming.

Inclus

1 vidéo

In this module, we will explore dynamic memory allocation techniques in C. From malloc() and calloc() to realloc(), you'll learn the basics of handling memory in C before diving deeper into C++ memory management.

Inclus

6 vidéos1 devoir

In this module, we will discuss memory allocation in C++ using the new and new[] operators. You will learn to allocate memory, manage arrays, and handle memory allocation failures effectively, setting the stage for smart pointer usage.

Inclus

8 vidéos1 devoir

In this module, we will introduce the concept of smart pointers in C++, explaining their significance and how they overcome common pitfalls associated with raw pointers, offering safer and more efficient memory management.

Inclus

2 vidéos1 devoir

In this module, we will dive into std::unique_ptr, showcasing its usage in managing dynamic memory. You will learn how to safely return and pass unique_ptrs, which helps ensure proper memory management and ownership semantics.

Inclus

4 vidéos1 devoir

In this module, we will focus on replacing raw pointers with smart pointers to eliminate common memory management errors. We will discuss strategies for preventing uninitialized pointers, dangling references, and the importance of exception safety.

Inclus

6 vidéos1 devoir

In this module, we will introduce custom deleters within smart pointers, providing more flexibility and control over memory management. We’ll cover how to define and use custom deleters to handle various memory management scenarios effectively.

Inclus

7 vidéos1 devoir

In this module, we will focus on std::make_unique and its role in simplifying memory management. You’ll learn how to use it to manage dynamic arrays safely and explore advanced techniques for efficient memory handling.

Inclus

4 vidéos1 devoir

In this module, we will introduce the PIMPL (Pointer to IMPLementation) idiom, which is a valuable technique for hiding implementation details and managing memory more effectively in C++.

Inclus

3 vidéos1 devoir

In this module, we will walk through a project that implements key concepts of smart pointers in C++. You’ll develop a game and an object pool, applying everything you’ve learned about memory management using smart pointers.

Inclus

4 vidéos1 devoir

In this module, we will cover advanced C++ concepts, including constructor behavior, observer patterns, and operator overloading. You’ll also learn about constexpr unique_ptr for compile-time memory management.

Inclus

6 vidéos3 devoirs

Instructeur

Packt - Course Instructors
Packt
1 749 Cours493 498 apprenants

Offert par

Packt

En savoir plus sur Software Development

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.’
Coursera Plus

Ouvrez de nouvelles portes avec Coursera Plus

Accès illimité à 10,000+ cours de niveau international, projets pratiques et programmes de certification prêts à l'emploi - tous inclus dans votre abonnement.

Faites progresser votre carrière avec un diplôme en ligne

Obtenez un diplôme auprès d’universités de renommée mondiale - 100 % en ligne

Rejoignez plus de 3 400 entreprises mondiales qui ont choisi Coursera pour les affaires

Améliorez les compétences de vos employés pour exceller dans l’économie numérique

Foire Aux Questions