CrazyEngineers
  • Dangling Pointer Discussion

    VIJAY CHAUHAN

    VIJAY CHAUHAN

    @vijay-chauhan-mlnYq1
    Updated: Oct 19, 2024
    Views: 1.2K
    What is a dangling name and Dangling Pointer????
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Whats In Name

    MemberMay 17, 2013

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • VIJAY CHAUHAN

    MemberMay 18, 2013

    Thanx friend 😀
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register