Currently reading about garbage collection in JavaScript, my resource is MDN as per usual. Knowledge to date:
- If an object does not have another object referencing it, it will be garbage collected
- Mark-and-sweep algorithms remove objects that can’t be reached when tracing from the roots / Global object.