About 92,600 results
Open links in new tab
  1. Smart Pointers in C++ - GeeksforGeeks

    Nov 11, 2025 · A smart pointer is a wrapper class around a raw pointer that automatically manages the lifetime of the object it points to. It ensures proper resource deallocation by automatically releasing …

  2. Smart pointers (Modern C++) | Microsoft Learn

    Jun 19, 2025 · In modern C++ programming, the Standard Library includes smart pointers, which are used to help ensure that programs are free of memory and resource leaks and are exception-safe.

  3. smart pointers - cppreference.com

    Jul 6, 2020 · The usage of smart_ptr allows us to easily pass and return references to objects without running into memory leaks or invalid attempts to access deleted references. They are thus a …

  4. 22.1 — Introduction to smart pointers and move semantics

    Feb 5, 2025 · A Smart pointer is a composition class that is designed to manage dynamically allocated memory and ensure that memory gets deleted when the smart pointer object goes out of scope. …

  5. Smart pointer - Wikipedia

    In computer science, a smart pointer is an abstract data type that simulates a pointer while providing added features, such as automatic memory management or bounds checking.

  6. What is a smart pointer and when should I use one?

    Sep 20, 2008 · In C++, smart pointers are implemented as template classes that encapsulate a pointer and override standard pointer operators. They have a number of advantages over regular pointers.

  7. What are Smart Pointers in C++? (With Examples) - Codecademy

    Learn what C++ smart pointers are, their types (unique_ptr, shared_ptr, weak_ptr), and how to use them with examples.

  8. C++ Smart Pointers (Shared, Unique and Weak Pointers)

    There are three types of smart pointers in C++, shared pointers, unique pointers and weak pointers. We’ll discuss each of them individually in the sections below.

  9. Allows us to create complex linked structures (double-linked lists, graphs, etc.) with "smart" memory management ... at the cost of maintaining reference counts!

  10. Smart Pointers in C++ - Intellipaat

    Jul 26, 2025 · A smart pointer is an object in C++ that works like a pointer by managing the memory automatically with the proper deallocation. It also helps to prevent the problems that are caused by …