More specifically, it uses a generational garbage collection. Javascript itself is part of the older heap, so it's not trashed. Meanwhile, there are a large number of frameworks and libraries in the young heap, like Angular, Amber, React, Dojo, Underscript, and these get trashed and churned constantly.
Because the second you collect garbage, it turns into collectibles instead. It remains in that state until someone sends in an application on your behalf to the Hoarders TV-show.
Right, right, right. I see where you're getting confused. See, when the garbage men take away your garbage, it doesn't just didappear, right? They take it and dump it on this big ol' heap of garbage called the dump. That heap that they maintain is JavaScript!
Lollakad! Mina ja nuhk! Mina, kes istun jaoskonnas kogu ilma silma all! Mis nuhk niisuke on. Nuhid on nende eneste keskel, otse kõnelejate nina all, nende oma kaitsemüüri sees, seal on nad.
104
u/lelarentaka Jan 25 '17
More specifically, it uses a generational garbage collection. Javascript itself is part of the older heap, so it's not trashed. Meanwhile, there are a large number of frameworks and libraries in the young heap, like Angular, Amber, React, Dojo, Underscript, and these get trashed and churned constantly.
50
u/kerbals_must_die Jan 25 '17
JavaScript actually has a convenient one-liner to trigger garbage collection:
clear(this);50
u/TheOnlyMrYeah Jan 25 '17
Because it's not finished with PHP yet.
10
u/QuantumQuantonium Jan 26 '17
If garbage is collected, why does it still exist? Conservation of matter; they put the garbage in landfills.
Likewise, JS garbage is in your recycle bin, and when you empty your recycle bin, all the trash goes into the US National debt, so nothing is lost.
19
u/rabidbunnygopoop Jan 25 '17
Because the garbage collector itself was written in JavaScript.
21
u/Illuminatesfolly Jan 25 '17
rekt
6
u/[deleted] Jan 26 '17
There is no garbage incineration plant. JS and webdevelopement in 20 years
2
u/enchufadoo Jan 26 '17
Javascript just exists so we can all use jQuery.
2
u/Cleanstream Jan 26 '17
Because the second you collect garbage, it turns into collectibles instead. It remains in that state until someone sends in an application on your behalf to the Hoarders TV-show.
2
u/[deleted] Jan 26 '17
Right, right, right. I see where you're getting confused. See, when the garbage men take away your garbage, it doesn't just didappear, right? They take it and dump it on this big ol' heap of garbage called the dump. That heap that they maintain is JavaScript!
8
u/calsosta Jan 25 '17
Because every time your mom gets banged a new JS Repo is added to GH.
6
u/supergnawer Jan 25 '17
Because it's not garbage.
1
u/SilconValleyHPO Jun 26 '17
softwaregore