dangling pointer
⚙️ The Truth: Memory isn’t erased immediately
When you write:
int *p = new int(5);
delete p;
cout << *p; // still prints 5 😮
This is called undefined behavior —but “undefined” does not mean it will always crash.It just means the compiler is free ...
yesamitsingh.hashnode.dev2 min read