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(ComponentLoader): loader leaks memory in multiple places #6625

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

JoschuaSchneider
Copy link

PR Checklist

Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated tests.
  • added/updated API documentation.
  • added/updated demos.

Changes

  • The ComponentLoader leaks the _componentRef, causing the entire BsDatepickerViewContainer to leak in our application.
  • A second leak occurs in the _registerOutsideClick function, which fails to properly setup the _globalListener when both outsideClick and outsideEsc are set to true. This causes the first unregister function (for the outside-click) to be overwritten by the unsubscribe function for the outsideEscClick subscription.

Memory and DOM-Nodes before the change:

image

and after the Change:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant