Tagged articles
3 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Aug 28, 2025 · Fundamentals

Unraveling C++ static: From Variables to Destruction Order

This article explains the many roles of the C++ static keyword—how it affects variables, functions and class members—then dives deep into static object lifetimes, destructor rules, destruction order across translation units, common pitfalls such as resource‑dependency bugs, memory leaks and multithreading issues, and finally offers practical solutions and interview‑style questions.

Cdestructorinitialization-order
0 likes · 28 min read
Unraveling C++ static: From Variables to Destruction Order
Liangxu Linux
Liangxu Linux
May 31, 2020 · Fundamentals

Detecting Memory Leaks and Errors with AddressSanitizer (ASan)

This guide explains how to use GCC's built‑in AddressSanitizer to detect memory leaks, heap/stack/global buffer overflows, use‑after‑free, and initialization‑order bugs, providing sample code, compilation flags, and example outputs for each error type.

AddressSanitizerC++ debuggingUse-After-Free
0 likes · 18 min read
Detecting Memory Leaks and Errors with AddressSanitizer (ASan)