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

ContextMenu plugin memory leak #2234

Closed
yzhang921 opened this issue Apr 17, 2019 · 5 comments
Closed

ContextMenu plugin memory leak #2234

yzhang921 opened this issue Apr 17, 2019 · 5 comments

Comments

@yzhang921
Copy link

yzhang921 commented Apr 17, 2019

Hi Vakata, as title described that maybe context menu plugin has a memory leak issue.
First, I doubt that there is some problem with my code. After I checked again and again and found out if I remove the contextMenu plugin then the memory leak issue disappeared.
Even if I didn't set any context items and turn on contextMenu plugin setting, memory leak also exists.

         //treeOption.contextmenu.items

           destroyed() {
            $(document).unbind('context_show.vakata');
            $(this.$el).find("#tree-body").empty();
            this.treeRef.destroy();
            $(this.$el).remove();
            $('context_show.vakata').remove();
            this.treeRef = null;
            this.tree = null;
@vakata
Copy link
Owner

vakata commented Feb 10, 2020

Sorry but I can't fix this - please provide a PR if you know where the leak is.

@vakata vakata closed this as completed Feb 10, 2020
@RamPonds
Copy link

Facing the memory leak in the similar fashion. $.jstree.plugins.contextmenu.prototype._data.core.original_container_html.prevObject.prevObject

@alex-Hudson
Copy link
Contributor

I also am facing this problem. In my application I also removed all context menu items and found the memory leak. When I removed the plugin from the jsTree plugins the memory leak was no longer observed

@alex-Hudson
Copy link
Contributor

alex-Hudson commented Sep 3, 2021

@vakata I have caught the memory leak. I will submit a PR.

@alex-Hudson
Copy link
Contributor

This issue is fixed by PR #2557 @vakata

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

No branches or pull requests

4 participants