C++ Delete Confusion

In the sample code
1
2
3
4
int* p_sample = new int;
*p_sample = 10;

delete p_sample;

let say the pointer p_sample is pointing at memory 5400

Is it deleting/free the value 10? or the memory 5400 and setting it to nullptr?
Delete just releases the memory back to the operating system. It doesn't change the memory or set the pointer to the nullptr.
Topic archived. No new replies allowed.