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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eventService memory leaks #9752

Merged

Conversation

nzdev
Copy link
Contributor

@nzdev nzdev commented Feb 3, 2021

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes N/A

Description

What?
Fix memory leaks by unbinding event from $rootscope.

Why?
Memory leaks in the browser when events are not unbound from the $rootscope.

How to test?
Ensure memory freed when navigating the backoffice ui.

@nzdev nzdev changed the title Fix memory leak in umbeditorheader Fix eventService memory leaks Feb 3, 2021
@nzdev
Copy link
Contributor Author

nzdev commented Feb 3, 2021

tinymce.service.js also appears to be leaking via events, leaving tinymce content in memory, but services cant use $scope.

@nzdev
Copy link
Contributor Author

nzdev commented Feb 3, 2021

Copy link
Contributor

@nathanwoulfe nathanwoulfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nzdev, I'd noticed memory spikes a while back when opening multiple infinite editors, this should help alleviate that issue. I've reverted the changes in the services as it's not required due to the lifespan of those object.

@nathanwoulfe nathanwoulfe merged commit 06e5d07 into umbraco:v8/contrib Feb 7, 2021
@nul800sebastiaan nul800sebastiaan added the category/performance Fixes for performance (generally cpu or memory) fixes label Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/performance Fixes for performance (generally cpu or memory) fixes community/pr release/8.12.0 type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants