#23: Garbage collection
by Tomasz Nurkiewicz
Creating new objects, arrays or strings is so straightforward that we often forget what happens underneath. And I don’t mean trying to figure out what this
refers to in JavaScript objects. I mean: memory management. On each request we create a ton of objects. A server can easily allocate hundreds of megabytes of memory. Per second. Memory is cheap and there’s a lot of it. But it’s not infinite. How come we can simply call new Object()
over and over again, taking more and more memory from our computer? Many objects are no longer needed a few milliseconds after they’re created. What happens to the memory they occupy? We take for granted what was thought to be almost impossible: automatic memory management.
More materials
- Garbage collection on Wikipedia
- Reference counting on Wikipedia
- Reference counting in Swift
- Yes, Rust Has Garbage Collection, And A Fast One
Be the first to listen to new episodes!
To get exclusive content:
- Transcripts
- Unedited, longer content
- More extra materials to learn
- Your user voice ideas are prioritized