-
-
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) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. Gl context deletion should be already taken care of via Maybe something is up with the gl2d There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @etpinard I was chasing a point pick regression but back on this now. The root call is a P.S. In fact, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... looks like I'm in a bit of a conundrum as there's a big amount of statefulness and I'm concerned that a purported fix from me (e.g. not delete
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Wow. That's bad. Nice catch. I think the best solution at the moment would be to add // remove gl contexts
Plots.cleanPlot([], {}, fullData, fullLayout); to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @etpinard! This
seems to go ahead and ultimately call |
||
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-plot3d
cleans its trace objects internally, but it would worth double checking 👍