When a pointer is deleted, is the memory it is pointing to only returned to the heap or is it also nulled too? Thx

Who knows, that's for the implementation to decide.
- in release mode, it's typically back in the heap untouched.
- in debug mode, it could be filled with some specific pattern to mark "deleted data", and perhaps held in a "pending" list for a while. Specifically to assist with spotting any "use after free" errors in the code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.