0
What is dangling pointer?
2 Answers
+ 1
Dangling pointers arise during object destruction, when an object that has an incoming reference is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory.
0
when u free some memory by delete action on an object or dynamically allocated data type.....and forget to change the pointer variable to point to null....it becomes dangling pointer as it is still pointing to something which no longer exist and may cause issue when dereferenced