Closed hosley closed 7 years ago
I believe this problem stems from trying to set the pouchdb change handler multiple times. Previously I had been setting this change handler in the [provider].getAll() type methods. I believe the intention is that the change handler be set only once. I have since moved the code to set the change handler to the forceInit() function so that they are only called once. This seems to fix the issue but I am not going to close this issue until I've done some more research as I've yet to understand the bug, only get around it.
The code below in therapist.ts is throwing (node) warning: possible EventEmitter memory leak detected. 11 listeners added.
After reading an article on Promises I believe the promises are in the StudentProvider and UserProvider are creating the memory leaks.
A possible solution would be to look into external promise libraries such as those referenced in the article to see if they might provide a solution to the problem