Skip to content

Commit f572c30

Browse files
authored
fix: 🐛 Memory leak in View3D (#101)
We need to tell vtkjs to release the memory when our component is no longer in use. Otherwise renderer context will stay and after a while it will crash the browser.
1 parent 54d2a76 commit f572c30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/VTKViewport/View3D.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ export default class View3D extends Component {
284284
if (this.props.onDestroyed) {
285285
this.props.onDestroyed();
286286
}
287+
288+
this.genericRenderWindow.delete();
287289
}
288290

289291
render() {

0 commit comments

Comments
 (0)