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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[style] Fix memory leak #8036

Merged
merged 1 commit into from Sep 4, 2017
Merged

[style] Fix memory leak #8036

merged 1 commit into from Sep 4, 2017

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 4, 2017

This is not good 馃檲. We had sheets.js keeping a reference to all the create sheets. This can be an important leak.

When calling createStyleSheet(), a StyleSheet is created. The constructor is adding itself to jss/sheets.js. But it's not removed when calling .detach().

So, we need to call removeStyleSheet() to be detached from jss/sheets.js.

Closes #8019

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Sep 4, 2017

@oliviertassinari oliviertassinari merged commit 3b40377 into mui:v1-beta Sep 4, 2017
@oliviertassinari oliviertassinari deleted the fix-memory-leak branch September 4, 2017 12:06
@zannager zannager added the package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants