Understanding Arc and Weak Reference Counting in Rust

=============== Arc<T> and Weak<T> are reference counting smart pointer types in Rust's standard library, designed for thread-safe shared ownership of data. They belong to the std::sync module and are commonly used in scenarios like building relational object models (with primary and foreign keys), implementing cache references, and ...

Posted on Sun, 20 Sep 2026 16:50:18 +0000 by hyeteck

Mastering C++ Memory Management: From Manual Allocation to Smart Pointers

Understanding Core Memory Mechanics In the C++ ecosystem, direct manipulation of memory addresses remains a defining characteristic. This capability offers high performance but imposes strict responsibility on the developer. Unlike managed environments such as Java or Python, where garbage collectors handle deallocation, C++ requires explicit c ...

Posted on Sat, 08 Aug 2026 16:30:02 +0000 by bben95

Effective C++ Guidelines and Implementation Techniques

Const Usage and Member Functions Proper Const Implementation Modern compilers enforce const correctness by requiring const member functions to return const references: class Document { public: const char& getCharAt(std::size_t index) const { return content[index]; } private: char* content; }; When implementing both const and non- ...

Posted on Mon, 29 Jun 2026 17:43:05 +0000 by yodasan000

Modern C++ Features: A Comprehensive Guide

Introduction to Modern C++ (C++11/14/17/20) This guide documents key features from the Modern C++ Tutorial: Quick Start with C++11/14/17/20. Chapter 2: Core Language Enhancements Compile-time Constants with constexpr The constexpr keyword allows expressions to be evaluated at compile time, enabling optimizations. constexpr int fibonacci_sequenc ...

Posted on Mon, 18 May 2026 16:40:13 +0000 by keyurshah