dustingetz / react-cursor

Immutable state for React.js
1.03k stars 50 forks source link

memory leak when use with server side rendering #61

Open taou-maimai opened 9 years ago

taou-maimai commented 9 years ago

Add a helper function called on server-side to reset 'refCache' in util.js?

dustingetz commented 9 years ago

Sure, send a PR and I'll merge that as a stop-gap. This makes fixing https://github.com/dustingetz/react-cursor/issues/17 much more important in my eyes.

taou-maimai commented 9 years ago

'refsCache'

taou-maimai commented 9 years ago

I will send a PR in 30 min.

dustingetz commented 8 years ago

@taou-maimai are you still using this in server side rendering? Does any of your server side code actually execute a cursor update (which would typically be wired to user interaction callbacks)? The memory leak can be solved without hacks for this special case using WeakMap.