Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The fix in https://github.com/meteor/meteor/commit/49e9813 seems to be just limiting the effect of the problem, not removing it.

The variable is still being held in memory just with the value null instead of whatever it was before.

Or does setting it to null trigger some special GC algorithm that detects that it isn't being used anymore?



There's nothing particularly special about null - it's really just that it's being set equal to any constant (or object that already exists for the life of the program). The object that was allocated and previously held in renderer will be GC'd (nothing special about that - it doesn't have any references anymore), and setting to null doesn't create a new allocation. You still have "renderer" as an entry in the dictionary of variables for the closure (which takes up a small amount of memory, presumably), but it's no longer preventing an object from being deallocated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: