Dangling pointers: The bane of every C/C++ programmer's existence?

  • This is a narrow view. What about the ".next" element of a linked list node that's moved to the tail of the list? If you're not using null to indicate end of list, .next is semantically wrong but harmless.

    Perhaps a better example is Knuth's Dancing Links. A node is taken out of a larger data structure, pointers left unchanged, because the node will be reinserted later.

    "Dangling pointer" is intuitive, but ultimately too broad to have much meaning.