C++ Deleting a pointer

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

C++ Deleting a pointer

Postby stuarte9 » Fri Aug 15, 2014 3:44 pm

Hi all,

Could some kind soul please help me to understand exactly what happens when a C++ pointer is deleted using "delete".

I fuzzily understand that the connection between the pointer and the memory that it points to is somehow broken.

Given that the pointer, after "delete" has executed and before it is set to NULL, still holds the address of that location in memory, in what way is the connection between the pointer and that location in memory broken ?

Thanks in advance for any help that you can give with this.

Best regards,

Posts: 55
Joined: Mon Mar 08, 2010 5:03 pm
Location: Scotland

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests