+ 2
How am I still able to access the value?
How am I still able to access the value even after clearing up the memory? Does the values stay even after deleting the allocated memory? https://code.sololearn.com/c46Ra6rCoxw7/?ref=app
4 Respuestas
+ 1
No. It just tells the processor that now that memory is freed so it can reused by other processes...
Edit : see this for better explanation Christian Grey
https://www.sololearn.com/Discuss/2209606/?ref=app
+ 1
Jayakrishna🇮🇳 but why is the value still available after clearing the memory?? Because clearing the memory must clear the value too rgt?
+ 1
Jayakrishna🇮🇳 Thanks:)
0
It will remain until in overridden by other processes and compiler specific. If don't delete then other processes can't use that memory...