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

Clear trackWrites on destroy to prevent memory leak #172

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

Conversation

schontz
Copy link

@schontz schontz commented Sep 10, 2024

I did some memory profiling and came across an orphaned editor in a detached DOM node. It looks to be related to trackWrites:

Screenshot 2024-09-10 at 12 08 13 PM

This patch clears trackWrites on destroy to prevent this case.

@marijnh
Copy link
Member

marijnh commented Sep 10, 2024

This is a link from the editor object, which you supposedly dropped references to, to a DOM node. I do not see how this would be able to introduce a leak. Do you have an example script that demonstrates this?

@schontz
Copy link
Author

schontz commented Sep 10, 2024

I'll see if I can make a minimal repro of it. I was debugging our app in production, which uses tiptap on top of prose mirror.

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.

2 participants