Title: Event replay memory leak · Issue #59261 · angular/angular · GitHub
Open Graph Title: Event replay memory leak · Issue #59261 · angular/angular
X Title: Event replay memory leak · Issue #59261 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Elements are not being garbage collected properly when the app is destroyed because they are captured inside the early event contract event ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Elements are not being garbage collected properly when the app is destroyed because they are capture...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Elements are not being garbage collected properly when the app is destroyed because they are capture...
Opengraph URL: https://github.com/angular/angular/issues/59261
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Event replay memory leak","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nNo\n\n### Description\n\nElements are not being garbage collected properly when the app is destroyed because they are captured inside the early event contract event info list. When calling `appRef.destroy()`, we can capture the heap snapshot and observe the detached `\u003capp-root />`, which cannot be garbage collected:\n\n\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/arturovt/ng-issue-event-replay-leak\n\n### Please provide the exception or error you saw\n\nElements are captured in that part of the code:\n\nhttps://github.com/angular/angular/blob/2c3630aafdf0f375e1e5fc45f9068a274b46b7c7/packages/core/primitives/event-dispatch/src/earlyeventcontract.ts#L69-L83\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 19.0.4\nNode: 20.11.1\nPackage Manager: yarn 1.22.22\nOS: linux x64\n\nAngular: 19.0.4\n... animations, cli, common, compiler, compiler-cli, core, forms\n... platform-browser, platform-browser-dynamic, platform-server\n... router, ssr\n\nPackage Version\n---------------------------------------------------------\n@angular-devkit/architect 0.1900.4\n@angular-devkit/build-angular 19.0.4\n@angular-devkit/core 19.0.4\n@angular-devkit/schematics 19.0.4\n@schematics/angular 19.0.4\nrxjs 7.8.1\ntypescript 5.6.3\nzone.js 0.15.0\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/arturovt","@type":"Person","name":"arturovt"},"datePublished":"2024-12-20T15:47:55Z","url":"https://github.com/angular/angular/issues/59261"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:41294c3c-b1a8-942e-e151-6f4fea4facbb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8CE:842EC:315E411:41D4C9B:6B01EFD9 |
| html-safe-nonce | 595bf2e06fefda06d2526d518e25006d5787d16039376fcaab7189106eaaf123 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOENFOjg0MkVDOjMxNUU0MTE6NDFENEM5Qjo2QjAxRUZEOSIsInZpc2l0b3JfaWQiOiI1NzQzNTU5MzQxODEwNzczOTc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a5b013fdc642a83916051ba81cd0030adde6c2c272d1e10b5f64af22741e1b03 |
| hovercard-subject-tag | issue:2752995767 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/59261/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3b5412aea6930394e7b283fb72c4465d28f6774f40e430ebd0a50650a66a7f49/angular/angular/issues/59261 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3b5412aea6930394e7b283fb72c4465d28f6774f40e430ebd0a50650a66a7f49/angular/angular/issues/59261 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Elements are not being garbage collected properly when the app is destroyed because they are capture... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arturovt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width