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

Correctly retain callbacks for event handlers #1

Open
meiersi opened this issue Sep 1, 2014 · 2 comments
Open

Correctly retain callbacks for event handlers #1

meiersi opened this issue Sep 1, 2014 · 2 comments
Labels

Comments

@meiersi
Copy link
Owner

meiersi commented Sep 1, 2014

Currently, we create event handler callbacks using the AlwaysRetain flag, which is a memory leak. Ideally, we'd change ReactJS such that it exposes the list of live callbacks to us. Then, we could register them with the GHCJS GC and create the callbacks with a NoRetain flag.

@meiersi meiersi added the bug label Sep 1, 2014
@cstrahan
Copy link

@meiersi Do you have a plan in place to implement this? If this will require coordination with the React devs, I'd love to get that ball rolling - I'd like to use this library for some work soon :).

@meiersi
Copy link
Owner Author

meiersi commented Sep 15, 2014

Hi @cstrahan, I was planning to first just fork ReactJS and see how I can expose their eventhandler references to an outside component. It shouldn't be too difficult, as they already use a central map to map react-id's back to event-handler closures. Once this works, I'd package up the work as a pull request to make sure the solution doesn't bitrot. However, I don't have concrete plans for when to work on this; i.e., if you need it soon, then you'll probably have to take a stab at it by yourself.

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

No branches or pull requests

2 participants