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

Fixing memory leak in DragDropContext. Fixes #715 #720

Merged
merged 1 commit into from
Aug 19, 2018

Conversation

alexreardon
Copy link
Collaborator

Fixes #715

@@ -167,7 +167,7 @@ export default class DragDropContext extends React.Component<Props> {
}

componentWillUnmount() {
window.addEventListener('error', this.onWindowError);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol! 😊

expect(() => wrapper.unmount()).not.toThrow();
});

it('should clean up any window event handlers', () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a test to ensure window handlers are cleaned up on unmount

@alexreardon alexreardon merged commit 48e0d84 into master Aug 19, 2018
@alexreardon alexreardon deleted the fixing-drag-drop-context-memory-leak branch August 19, 2018 23:09
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.

1 participant