Skip to content

Commit

Permalink
[BUGFIX LTS] fix memory leak in RouterService
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Majoros committed Jul 30, 2021
1 parent 012eae1 commit 238e016
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@ember/-internals/routing/lib/services/router.ts
Expand Up @@ -62,6 +62,12 @@ export default class RouterService extends Service {
return (this[ROUTER] = router);
}

willDestroy() {
super.willDestroy(...arguments);

this[ROUTER] = null;
}

/**
Transition the application into another route. The route may
be either a single route or route path:
Expand Down

0 comments on commit 238e016

Please sign in to comment.