fix: Remove Frame Processor when Camera unmounts (#1960)
* unsetFrameProcessor when camera view is removed * Use `this.lastFrameProcessor` instead --------- Co-authored-by: Marc Rousavy <marcrousavy@hotmail.com>
This commit is contained in:
parent
18b30cd073
commit
d51ac1529b
@ -431,6 +431,13 @@ export class Camera extends React.PureComponent<CameraProps> {
|
||||
this.lastFrameProcessor = frameProcessor
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
componentWillUnmount(): void {
|
||||
if (this.lastFrameProcessor !== null) {
|
||||
this.unsetFrameProcessor()
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
/** @internal */
|
||||
|
Loading…
Reference in New Issue
Block a user