We're all aware that closure sticks around in memory for our benefit. Because of existing or intentional created reference, it can not be garbage-collected. My question here is what if I want it to be GC'd, how do I go about doing that? This is actually one of the interview questions I got recently.Thanks a bunch!
Asked
Active
Viewed 43 times
0
-
possible duplicate of [this](http://stackoverflow.com/questions/12619701/garbage-collection-in-javascript-closures) – ricky Jan 08 '17 at 19:37
-
`var yourClosureRef = null;` should do it. – Legends Jan 08 '17 at 19:46