Garbage Collection
dev.to·5d·
Discuss: DEV
Flag this post

It’s easy to forget, while working in the abstract in terms of functions and algorithms, that the memory our programs depend on is real. The values we use in our programs actually exist on the hardware at specific addresses. If we don’t keep track of where we’ve stored data, we run the risk of overwriting something important and getting the wrong information when we go to look it up again. On the other hand, if we’re too guarded about protecting our data, even after we’re finished with it, we waste memory that the program could better use on other tasks.

Most programming languages today implement garbage collection to automate periodi…

Similar Posts

Loading similar posts...