-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Memory leak fixes #724
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
Memory leak fixes #724
Changes from 2 commits
c123ebc
6c92920
57c7779
8937668
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -809,6 +809,16 @@ plots.purge = function(gd) { | |
| // remove modebar | ||
| if(fullLayout._modeBar) fullLayout._modeBar.destroy(); | ||
|
|
||
| if(fullLayout._plots) { | ||
|
||
| Object.keys(fullLayout._plots).map(function(key) { | ||
| var plot = fullLayout._plots[key]; | ||
| if(plot._scene2d) { | ||
| plot._scene2d.destroy(); | ||
| plot._scene2d = null; | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| // data and layout | ||
| delete gd.data; | ||
| delete gd.layout; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find.
I think the
gl-plot3dcleans its trace objects internally, but it would worth double checking 👍