Weak Pointer
Noun · Development
Definitions
A non-owning reference to a resource managed by reference counting (such as std::weak_ptr in C++ or Weak<T> in Rust) that does not prevent the resource from being deallocated, and must be explicitly upgraded to a strong reference before use — returning None or null if the resource has already been freed.
In plain English: A reference to something in memory that won't keep it alive — you have to check if it still exists before using it.
Example: "Use a weak pointer for the parent reference in the tree node, otherwise you get a reference cycle and the whole tree leaks."