{"id":50976093,"url":"https://github.com/xpl/r3f-leak","last_synced_at":"2026-06-19T08:03:41.655Z","repository":{"id":354916341,"uuid":"1225992988","full_name":"xpl/r3f-leak","owner":"xpl","description":"R3F leaks the last root's state via module-level variables in the render loop","archived":false,"fork":false,"pushed_at":"2026-05-11T21:53:45.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T23:38:12.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xpl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-30T21:30:37.000Z","updated_at":"2026-05-11T21:53:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xpl/r3f-leak","commit_stats":null,"previous_names":["xpl/r3f-leak"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xpl/r3f-leak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Fr3f-leak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Fr3f-leak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Fr3f-leak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Fr3f-leak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xpl","download_url":"https://codeload.github.com/xpl/r3f-leak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Fr3f-leak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34522042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-19T08:03:39.710Z","updated_at":"2026-06-19T08:03:41.648Z","avatar_url":"https://github.com/xpl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to run\n\n```\nnpm i\nnpm run dev\n```\n\n# What happens\n\nR3F leaks the last root's state via module-level variables in the render loop.\n\nAfter all Canvas components unmount and _roots is empty, the module-scoped `state`, `subscribers`, and `subscription` variables in the loop/update functions still reference the last rendered root's store state — preventing GC of the entire fiber tree and any bridged context values.\n\nRepro: click the button, wait for all 16 cycles, force garbage collection in DevTools, observe last value stays \"alive\".\n\n\u003cimg width=\"1481\" height=\"632\" alt=\"Screenshot 2026-04-30 at 4 28 35 PM\" src=\"https://github.com/user-attachments/assets/c5f271f4-6732-477a-9830-2e7417c2c7ce\" /\u003e\n\n# Bug report / PR fix\n\nhttps://github.com/pmndrs/react-three-fiber/pull/3747\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpl%2Fr3f-leak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxpl%2Fr3f-leak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpl%2Fr3f-leak/lists"}