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

Awareness and Doc memory leak #70

Closed
nemanja-tosic opened this issue May 30, 2021 · 0 comments · Fixed by #71
Closed

Awareness and Doc memory leak #70

nemanja-tosic opened this issue May 30, 2021 · 0 comments · Fixed by #71
Assignees
Labels
bug Something isn't working

Comments

@nemanja-tosic
Copy link
Contributor

Describe the bug

The beforeunload listener isn't removed on destroy, an Awareness instance and a Doc instance are captured via closure and cannot be garbage collected in the browser. See: https://github.com/yjs/y-websocket/blob/master/src/y-websocket.js#L280

To Reproduce

  1. Instantiate provider
  2. Destroy it
  3. Make a memory snapshot and look for retainers of Awareness/Doc

Expected behavior

Awareness/Doc should be garbage collected after destroying the provider.

Environment Information

  • Browser

Additional

Memory profile after destroying the provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants