PhantomReference
PhantomReference is a concept in computer science related to memory management, particularly in garbage collection. It describes a situation where an object is still referenced by a weak reference, but all strong references to it have been cleared. In typical garbage collection scenarios, an object is reclaimed when there are no strong references pointing to it. However, a weak reference does not prevent an object from being garbage collected.
When an object is about to be deallocated because all strong references are gone, but it is
The primary use case for phantom references is to perform cleanup actions that must occur after an