Update Pointers_C++.md

This commit is contained in:
Aakash Panchal
2020-05-17 14:08:58 +05:30
committed by GitHub
parent 3c34bfa2fc
commit 7af44a9ea8

View File

@@ -1011,6 +1011,8 @@ A memory leak happens when your program loses the address of dynamically allocat
**Solution:** Delete(deallocate memory) before anything goes wrong.
### Dangling pointer
A pointer that is pointing to a deallocated memory is called a **dangling pointer**. Dereferencing or again deallocating a dangling pointer will lead to undefined behavior(run-time error).