Pointers that do not point to a valid object of the appropriate type. Dangling pointers arise when an object 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. As the system may reallocate the previously freed memory to another process, if the original program then dereferences the (now) dangling pointer, unpredictable behavior may result, as the memory may now contain completely different data. This is especially the case if the program writes data to memory pointed by a dangling pointer, as silent corruption of unrelated data may result, leading to subtle bugs that can be extremely difficult to find, or cause segmentation faults.View more random threads:
- Disadvantage of encapsulation
- Compound assignment +=, -=, *=, /=, %=, >>=, <<=, &=, ^=,...
- Define function in c++ May 2011
- Static Variable in c++ 2011
- what is difference between *a.b and (*a).b ?
- Passing 2d array by reference June 2011
- Vector of stucts in c++ 2011-12
- Pointers are not accessible for static member funcion
- char data type in c and C++
- what is ADT?
Sponsored Links
There are currently 1 users browsing this thread. (0 members and 1 guests)