revokeObjectURLs

This commit is contained in:
Matthew Hodgson 2018-04-29 03:17:55 +01:00
parent bffd5bb891
commit 9c5407c21f
3 changed files with 23 additions and 0 deletions

View file

@ -120,6 +120,15 @@ module.exports = React.createClass({
}
},
componentWillUnmount: function() {
if (this.state.decryptedUrl) {
URL.revokeObjectURL(this.state.decryptedUrl);
}
if (this.state.decryptedThumbnailUrl) {
URL.revokeObjectURL(this.state.decryptedThumbnailUrl);
}
},
render: function() {
const content = this.props.mxEvent.getContent();