Tombstones are a mechanism to detect dangling pointers and mitigate the problems they can cause in computer programs.
A tombstone is a structure that acts as an intermediary between a pointer and its target, often heap-dynamic data in memory.
When the data is deallocated, the tombstone is set to a null (or, more generally, to a value that is illegal for a pointer in the given runtime environment), indicating that the variable no longer exists.
For example, in filesystems it may be efficient when deleting files to mark them as "dead" instead of immediately reclaiming all their data blocks.
[3] Among popular programming languages, C++ implements the tombstone pattern in its standard library as a weak pointer using std::weak_ptr.