Tagged articles

weak references

4 articles · Page 1 of 1
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Mar 13, 2025 · Fundamentals

Master Go’s New Cleanup Functions and Weak Pointers for Safer Memory Management

Go 1.24 introduces runtime.AddCleanup and weak.Pointer, advanced garbage‑collector tools that let developers attach cleanup callbacks without retaining objects and safely cache objects via weak references, offering more precise memory management, eliminating finalizer pitfalls, and enabling custom unique‑package implementations.

cleanup functionsruntime.AddCleanupweak references
0 likes · 9 min read
Master Go’s New Cleanup Functions and Weak Pointers for Safer Memory Management
Test Development Learning Exchange
Test Development Learning Exchange
Jan 1, 2024 · Fundamentals

Handling Circular References and Memory Leaks in Python with weakref and gc Modules

This article explains how circular references cause memory leaks in Python, describes the role of reference counting and the cyclic garbage collector, and provides practical examples using the weakref and gc modules to create weak references, detect, and manually manage cyclic garbage.

Circular ReferencesGarbage CollectionMemory Management
0 likes · 6 min read
Handling Circular References and Memory Leaks in Python with weakref and gc Modules
21CTO
21CTO
Nov 30, 2019 · Backend Development

What’s New in PHP 7.4? Typed Properties, Arrow Functions, and More

PHP 7.4 introduces a suite of powerful features—including typed properties, arrow functions, limited covariance/contravariance, array unpacking, numeric literal separators, short lambda syntax, weak references, throwable __toString() and Opcache preloading—each illustrated with concise code examples for modern backend development.

Arrow FunctionsBackend DevelopmentPHP
0 likes · 5 min read
What’s New in PHP 7.4? Typed Properties, Arrow Functions, and More