A smart pointer to an object already owned by a unique_ptr. It doesn't own the object but it self zeroes when the object is deleted so that it can never dangle.
c-plus-plussafetymemory-managementsmart-pointerunique-ptrdangling-pointer-detectionobserver-ptrweak-pointersdangling-pointerssmart-pointers-librarypointer-safetyptr-to-uniquesafe-cplusplussecondary-pointernon-owning-smart-pointer
-
Updated
Feb 20, 2025 - C++