Skip to content

Commit

Permalink
[style] Fix memory leak (mui#8036)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Sep 4, 2017
1 parent 6786aad commit 3b40377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/styles/withStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function withStyles(stylesOrCreator: Object, options?: Options = {}) {

if (sheetManagerTheme.refs === 0) {
sheetManager.delete(theme);
sheetManagerTheme.sheet.detach();
this.jss.removeStyleSheet(sheetManagerTheme.sheet);
const sheetsRegistry = this.context[ns.sheetsRegistry];
if (sheetsRegistry) {
sheetsRegistry.remove(sheetManagerTheme.sheet);
Expand Down

0 comments on commit 3b40377

Please sign in to comment.