Skip to content

fix(Autofocus): guard depthPickingPass/copyPass against double dispose - #354

Open
kvvasuu wants to merge 1 commit into
fix/03-effectcomposer-leak-and-reorderfrom
fix/04-autofocus-double-dispose
Open

fix(Autofocus): guard depthPickingPass/copyPass against double dispose#354
kvvasuu wants to merge 1 commit into
fix/03-effectcomposer-leak-and-reorderfrom
fix/04-autofocus-double-dispose

Conversation

@kvvasuu

@kvvasuu kvvasuu commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Stacked PR 4/6 — part of a split of #350.
← based on #353 · → followed by #355

EffectComposerImpl.dispose() disposes every pass it holds, including these two added via composer.addPass - if Autofocus unmounts alongside its ancestor EffectComposer, its own cleanup disposed them a second time. This collision only becomes reachable now that the composer lifecycle fix (previous commit) actually disposes the composer on unmount - previously it leaked and never disposed at all, so it never collided with Autofocus's own cleanup.

EffectComposerImpl.dispose() disposes every pass it holds, including
these two added via composer.addPass - if Autofocus unmounts alongside
its ancestor EffectComposer, its own cleanup disposed them a second
time. This collision only becomes reachable now that the composer
lifecycle fix (previous commit) actually disposes the composer on
unmount - previously it leaked and never disposed at all, so it never
collided with Autofocus's own cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant