1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-14 19:02:33 +03:00

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();