Tagged articles
11 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Oct 20, 2025 · Fundamentals

How to Detect and Fix C++ Memory Leaks on Linux: Tools, Tips, and Code

This article explains what memory leaks are in C++ on Linux, why they matter, how they occur, and provides practical guidance on detecting them with tools like Valgrind, AddressSanitizer, GDB, and mtrace, followed by concrete solutions such as proper new/delete usage, smart pointers, RAII, custom allocators, and memory pools.

AddressSanitizerC++Linux
0 likes · 39 min read
How to Detect and Fix C++ Memory Leaks on Linux: Tools, Tips, and Code
php Courses
php Courses
Sep 22, 2025 · Fundamentals

Boost C++ Performance: Proven Memory Management Techniques You Must Use

This article explores why efficient memory management is crucial for C++ performance and presents practical strategies—including stack allocation, RAII, smart pointers, custom memory pools, optimal containers, move semantics, and diagnostic tools—to write faster, more robust programs.

CPerformance OptimizationRAII
0 likes · 9 min read
Boost C++ Performance: Proven Memory Management Techniques You Must Use
Deepin Linux
Deepin Linux
Sep 17, 2025 · Fundamentals

Why new/delete Beats malloc/free: A Deep Dive into C/C++ Memory Management

This article explains the core differences between C's malloc/free and C++'s new/delete, covering allocation mechanisms, object construction and destruction, error handling, common pitfalls, and best practices—including smart pointers—to help developers choose the right memory management approach for various programming scenarios.

Callocationmalloc
0 likes · 32 min read
Why new/delete Beats malloc/free: A Deep Dive into C/C++ Memory Management
Deepin Linux
Deepin Linux
Sep 11, 2025 · Fundamentals

Mastering C++ Smart Pointers: unique_ptr, shared_ptr, and weak_ptr Explained

This article introduces C++ smart pointers—unique_ptr, shared_ptr, and weak_ptr—explaining their RAII‑based automatic memory management, usage patterns, performance considerations, common pitfalls such as cyclic references, and practical examples including factory patterns and GUI data sharing, while also covering size and custom deleters.

CMemory Managementshared_ptr
0 likes · 24 min read
Mastering C++ Smart Pointers: unique_ptr, shared_ptr, and weak_ptr Explained
Deepin Linux
Deepin Linux
Sep 11, 2025 · Fundamentals

Mastering C++ Memory: When to Use new/delete vs malloc/free

This article explains the fundamental differences between C's malloc/free and C++'s new/delete, covering their underlying mechanisms, proper usage patterns, common pitfalls, error‑handling strategies, and best‑practice recommendations such as smart pointers and memory‑pool techniques.

CMemory Managementmalloc
0 likes · 29 min read
Mastering C++ Memory: When to Use new/delete vs malloc/free
Deepin Linux
Deepin Linux
Jun 20, 2025 · Fundamentals

Unlock C++11: 10 Game‑Changing Features Every Developer Must Master

This article walks through the most impactful C++11 enhancements—including initializer lists, auto type deduction, decltype, smart pointers, lambda expressions, move semantics, range‑based for loops, nullptr, constexpr, type aliases, and the thread library—explaining their syntax, benefits, and practical usage with clear code examples.

C++11LambdaThread
0 likes · 27 min read
Unlock C++11: 10 Game‑Changing Features Every Developer Must Master
Deepin Linux
Deepin Linux
Dec 26, 2024 · Fundamentals

Understanding C++ Smart Pointers: Types, Mechanisms, and Best Practices

This article explains how C++ smart pointers—unique_ptr, shared_ptr, weak_ptr and the deprecated auto_ptr—use RAII and reference‑counting to automate memory management, avoid leaks and dangling pointers, and provide guidelines, performance analysis, and practical usage tips for modern C++ development.

C++Memory ManagementRAII
0 likes · 36 min read
Understanding C++ Smart Pointers: Types, Mechanisms, and Best Practices
Deepin Linux
Deepin Linux
Aug 26, 2024 · Fundamentals

Understanding and Preventing Memory Leaks in C++ Applications

The article explains what memory leaks are, common causes, and presents practical techniques such as avoiding heap allocations, using smart pointers, employing arena allocators, leveraging coroutines, applying RAII, and debugging with tools like gperftools to detect and resolve leaks in C++ programs.

ArenaC++RAII
0 likes · 12 min read
Understanding and Preventing Memory Leaks in C++ Applications
Deepin Linux
Deepin Linux
Nov 3, 2023 · Fundamentals

C++11 New Features and Their Practical Usage

This article provides a comprehensive overview of C++11 enhancements, including list initialization, type deduction, constexpr, move semantics, perfect forwarding, lambda expressions, smart pointers, and new casting rules, with detailed explanations and code examples illustrating their syntax, behavior, and practical applications.

C++11CastingLambda Expressions
0 likes · 61 min read
C++11 New Features and Their Practical Usage
Tencent Cloud Developer
Tencent Cloud Developer
Jan 4, 2022 · Fundamentals

Smart Pointers in C++: Problems Solved, Usage, Best Practices, and Implementation Details

C++11 smart pointers—unique_ptr, shared_ptr, and weak_ptr—replace manual new/delete by providing exclusive, shared, and non‑owning ownership semantics, automatically preventing leaks and dangling references, simplifying multithreaded code, and, when used with best‑practice guidelines, avoid common pitfalls such as double deletions and cyclic dependencies.

C++multithreadingshared_ptr
0 likes · 24 min read
Smart Pointers in C++: Problems Solved, Usage, Best Practices, and Implementation Details