Skip to content

fix: 延迟支付宝 canvas 首帧渲染#351

Merged
huaxiabuluo merged 3 commits into
masterfrom
fix-my-canvas-first-render
May 13, 2026
Merged

fix: 延迟支付宝 canvas 首帧渲染#351
huaxiabuluo merged 3 commits into
masterfrom
fix-my-canvas-first-render

Conversation

@huaxiabuluo
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces lifecycle management to prevent memory leaks and errors in asynchronous callbacks after a component is unmounted. It adds a destroyed flag, handles animation frame cancellation in didUnmount, and includes checks for the destroyed state before canvas operations. The reviewer suggested explicitly nullifying the nativeCanvas reference during unmount to improve garbage collection and adding a guard check before setting the native canvas reference in the asynchronous selector callback to ensure the component is still mounted.

Comment thread packages/f-my/src/index.tsx
Comment thread packages/f-my/src/index.tsx
huaxiabuluo and others added 2 commits May 13, 2026 12:43
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@huaxiabuluo huaxiabuluo merged commit cb0906a into master May 13, 2026
3 checks passed
@huaxiabuluo huaxiabuluo deleted the fix-my-canvas-first-render branch May 13, 2026 04:50
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