Dangling Pointer Discussion

What is a dangling name and Dangling Pointer????

Replies

  • Whats In Name
    Whats In Name
    A pointer points to some specific location in memory.
    Eg : 'a' is a pointer pointing to a memory address 4000 which is containing some data.
    After we delete the data which was at address 4000,it actually means address 4000 in memory is now a part of free memory pool which can be used for reallocation of some data.But a is still pointing to address 4000.In this case 'a' is a dangling pointer.

    To avoid the problem of dangling pointer after freeing memory address,we should point it to NULL.
  • VIJAY CHAUHAN
    VIJAY CHAUHAN
    Thanx friend 😀

You are reading an archived discussion.

Related Posts

can u explain me clearly about automation in transmission substations ????
Greetings Readers, Here is the first article in my series "A Walk to Secure future" "Let us discuss about the basic concept of hacking and general notions and knowledge of...
So What I understood is that- Classname object=new Classname(); Here an object will be created in heap and the reference to it will be stored in stack.After we close the...
In Indian smartphone market we have Nokia Lumia 520 (~10-11K), 620 (14-15K), 720 (18-19K), 820 (23-24 K) and 920 (35-38 K). Feature wise, except Lumia 520 all have front and...
I have know some details. I need an more details about inverter. what are the procedure to do inverter business and how investments and how is markets for inverter. please...