fix(android): fix leak caused by removing lifecycle listener too early (#3380)
* Fix lifecycle listener being removed too early
This commit is contained in:
parent
b3744f9b9f
commit
0c0f3174cb
@ -1,4 +1,6 @@
|
||||
|
||||
# [6.0.0-beta.1](https://github.com/react-native-video/react-native-video/compare/v6.0.0-beta.0...v6.0.0-beta.1) (WIP)
|
||||
* **android:** fix leak caused by removing lifecycle listener too early ([#3380](https://github.com/react-native-video/react-native-video/pull/3380))
|
||||
|
||||
# [6.0.0-beta.0](https://github.com/react-native-video/react-native-video/compare/v6.0.0-alpha.11...v6.0.0-beta.0) (2023-11-18)
|
||||
|
||||
|
@ -349,6 +349,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
@Override
|
||||
public void onHostDestroy() {
|
||||
stopPlayback();
|
||||
themedReactContext.removeLifecycleEventListener(this);
|
||||
}
|
||||
|
||||
public void cleanUpResources() {
|
||||
@ -881,7 +882,6 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
}
|
||||
adsLoader = null;
|
||||
progressHandler.removeMessages(SHOW_PROGRESS);
|
||||
themedReactContext.removeLifecycleEventListener(this);
|
||||
audioBecomingNoisyReceiver.removeListener();
|
||||
bandwidthMeter.removeEventListener(this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user