VideoView: Fix a dispatcher leak
Make sure we unregister from the dispatcher when the videoview goes away.
This commit is contained in:
parent
49c1d39f93
commit
0d0a379cd8
1 changed files with 6 additions and 2 deletions
|
@ -25,8 +25,12 @@ var dis = require('../../../dispatcher');
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'VideoView',
|
displayName: 'VideoView',
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentDidMount: function() {
|
||||||
dis.register(this.onAction);
|
this.dispatcherRef = dis.register(this.onAction);
|
||||||
|
},
|
||||||
|
|
||||||
|
componentWillUnmount: function() {
|
||||||
|
dis.unregister(this.dispatcherRef);
|
||||||
},
|
},
|
||||||
|
|
||||||
getRemoteVideoElement: function() {
|
getRemoteVideoElement: function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue