Do we need to del all variables before a big program finishes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Do we need to del all variables before a big program finishes

Is there a great need to delete all variables when you finish a big project? If you do not delete the variables, where will they be after the program runs and finishes? Is there a way to clear all variables at the same time?

27th Sep 2017, 10:29 AM
Edward Ji
Edward Ji - avatar
3 Answers
+ 1
Once the program finishes, the memory(RAM) reserved for it is set free, so there is no actual need to manually do it.
27th Sep 2017, 11:23 AM
spcan
spcan - avatar
+ 1
no
10th Jan 2018, 7:18 PM
wook
wook - avatar
0
Nope, the most variables would be handled over the stack. And it is clean, when your program ends. But if you are going to make it very special (pointer, stack manipulating, mem alloc etc...) under C as example, you have dirty ways to manipulate everything. Then you have to clean up the room bevore leaving.
13th Jan 2018, 12:57 PM
Heinrich Weber