Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxListeners #47

Open
gillesdemey opened this issue May 18, 2015 · 3 comments
Open

maxListeners #47

gillesdemey opened this issue May 18, 2015 · 3 comments

Comments

@gillesdemey
Copy link

Hi,

I was having an issue where node was complaining about a potential memory leak because too many listeners were being added for the same event.

I saw that this was fixed in Biff (FormidableLabs@04edf8a) but not in this repo.

Is there a particular reason for that? Could we apply the same fix here?

@tomatau
Copy link
Contributor

tomatau commented May 19, 2015

You can setMaxlisteners directly onto the store object yourself to prevent the error bubbling:

MyStore.setMaxlisteners(0);

but I'm not sure why we keep the default max listeners on stores, I guess it's quite useful to catch memory leaks from components not being unmounted or being unmounted incorrectly

@kenwheeler
Copy link
Owner

The fix will find its way back here, I've just been swamped at my full time.

@gillesdemey
Copy link
Author

I should have pointed out that I already fixed it the way that @tomatau described it.

But now I'm second-guessing the way I've structured my components, instead of having every GridItem listen to a Store, I should probably have the GridView listen to it and propagate the changes to the items via a property?

Anyhow, I can whip up a PR for the Store if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants