文檔 http://nodejs.org/api/events.html 中寫到:
By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited.
其中「This is a useful default which helps finding memory leaks」。兩個問題:
1、這個東西如何檢查內存泄漏? 2、Node.js 在什麼時候會內存泄漏?