react-cursor icon indicating copy to clipboard operation
react-cursor copied to clipboard

memory leak when use with server side rendering

Open taou-maimai opened this issue 10 years ago • 4 comments
trafficstars

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

taou-maimai avatar Sep 02 '15 17:09 taou-maimai

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.

dustingetz avatar Sep 02 '15 17:09 dustingetz

'refsCache'

taou-maimai avatar Sep 02 '15 17:09 taou-maimai

I will send a PR in 30 min.

taou-maimai avatar Sep 02 '15 17:09 taou-maimai

@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.

dustingetz avatar Dec 29 '15 13:12 dustingetz