Tagged articles
3 articles
Page 1 of 1
IT Services Circle
IT Services Circle
May 21, 2026 · Fundamentals

When `const auto& r = cond ? a : b;` Becomes a Dangling Reference – 3 C++ Lifetime‑Extension Pitfalls

The article explains that although C++ extends the lifetime of temporaries bound to a const reference, this rule has three critical edge cases—returning const references from functions, binding references in member initializer lists, and using the ternary operator—each of which can produce a dangling reference and cause obscure runtime crashes.

Best PracticesCcompiler warnings
0 likes · 13 min read
When `const auto& r = cond ? a : b;` Becomes a Dangling Reference – 3 C++ Lifetime‑Extension Pitfalls
IT Services Circle
IT Services Circle
Apr 9, 2022 · Fundamentals

Using Cppcheck for Static Code Analysis in C/C++ Projects

This article explains why static analysis is essential for C/C++ development, compares compiler warnings with dedicated tools, introduces cppcheck, shows how to install and use it on sample programs, and demonstrates its ability to uncover bugs that compilers often miss.

C++bug detectioncode quality
0 likes · 8 min read
Using Cppcheck for Static Code Analysis in C/C++ Projects
Alibaba Cloud Developer
Alibaba Cloud Developer
Sep 20, 2017 · Mobile Development

Why a Single Warning Can Cause Xcode to Eat 6GB RAM – A Real‑World iOS Debugging Tale

An iOS team discovered that Xcode’s memory usage jumped from 2 GB to nearly 7 GB after a codebase upgrade, traced the surge to hundreds of nonnull warnings embedded in header files that inflated .dia cache files, and resolved the issue by removing the warnings, highlighting the hidden cost of ignored compiler warnings.

Memory UsageXcodecache files
0 likes · 8 min read
Why a Single Warning Can Cause Xcode to Eat 6GB RAM – A Real‑World iOS Debugging Tale