jss
jss copied to clipboard
Global SheetsRegistry leaks memory?
Expected behavior:
Created StyleSheet instances should not be retained indefinitely.
Describe the bug:
StyleSheet instances are being retained inside the global SheetsRegistry.
Codesandbox link:
Run the react-jss example code https://github.com/cssinjs/react-todomvc-jss.git
- Take memory snapshot.
- Add a few items.
- Delete those items.
- Repeat step 2 and 3 a few more times.
- Take another memory snapshot.
- Filter both snapshots by constructor named
StyleSheetand you'll find the number only grows.
Versions (please complete the following information):
- jss: The example is using 6.5.0, but I believe the issue is present in all versions.
- Browser [e.g. chrome, safari]: Chrome
- OS [e.g. Windows, macOS]: MacOS Feel free to add any additional versions which you may think are relevant to the bug.