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

Speaking of memory leaks, I once had to debug a memory leak caused by console log entries. Objects that are logged to the console are prevented from being garbage collected, even if the console was never opened. That includes DOM nodes or I think also handles to WebGL textures.


Interesting, I think that's because logged objects are "live", so you can inspect their current state, not just the state at the point of logging.


That’s interesting. I’m guessing console.log appends to the window object somewhere, which is a fairly common method of image preloading.




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

Search: