Closed nemanja-tosic closed 3 years ago
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
Expected behavior
Awareness/Doc should be garbage collected after destroying the provider.
Environment Information
Additional
Memory profile after destroying the provider.
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
Expected behavior
Awareness/Doc should be garbage collected after destroying the provider.
Environment Information
Additional
Memory profile after destroying the provider.