memory leak causes because of loosing the access path of it through the pointer,which was previously pointing to that location and now its value is changed. In other words, the pointer which was...
Type: Posts; User: sangit
memory leak causes because of loosing the access path of it through the pointer,which was previously pointing to that location and now its value is changed. In other words, the pointer which was...
Can anybody please tell me how memory leaks and dangling pointers are two aspects of the same problem?
Thanks
Rewrite the following statements accurately and explain why the given version is inaccurate and your version is accurate
"Dereferencing memory leaks leads to dangling pointers.
Can somebody...
sorry, still confused little bit..
Now my understading is deallocating a pointer does not avoid dangling pointer because pointer value is not changed yet. after deallocation setting the pointer...
Thank you so much
So 'deallocating a pointer' means setting pointer's value to NULL?
Thanks
My understanding of dangling pointer is,'when the memory to which pointer is pointing to, is deallocated then the pointer becomes dangling. Pointer also becomes dangling when you try to dereference...
My question is, if the following sentence is true or false? why?
It is important to deallocate a pointer to avoid dangling pointers.
Thanks