Causes of memory leaks in Node.js, hmmn. Well what comes to mind are:
- Using more memory than was allocated.
- Not freeing up memory. This will block the memory and with time, cause a memory leak.
- Bad memory allocation and deallocation in Node.js or an npm package written with C or CPP.
- Holding a chunk of memory allocated to run an action longer than is required. Basically not freeing up memory.