Skip to content

Fix WebGL context leak on Canvas unmount - #939

Open
Msa360 wants to merge 1 commit into
tscircuit:mainfrom
Msa360:Msa360/fix-webgl-context-leak
Open

Fix WebGL context leak on Canvas unmount#939
Msa360 wants to merge 1 commit into
tscircuit:mainfrom
Msa360:Msa360/fix-webgl-context-leak

Conversation

@Msa360

@Msa360 Msa360 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

The main viewer's unmount cleanup called renderer.dispose() but never renderer.forceContextLoss(), so each tab switch stranded a WebGL context until the browser hit its ~16-context limit and evicted the oldest. dispose() only frees GPU resources; forceContextLoss() releases the context itself. OrientationCubeCanvas already did this correctly.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview, Comment Jun 17, 2026 9:56pm

Request Review

@Msa360

Msa360 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's get a second reviewer to make sure that this works, i'm not seeing a lot of stuff about this method online CC @Abse2001 @ShiboSoftwareDev

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.

2 participants