mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The `bootstrap()` phase might fail e.g. due to an rejected promise in some `APP_INIIALIZER`. If `PlatformRef` is not destroyed, then the main app's injector is not destroyed and therefore `ngOnDestroy` hooks of singleton services is not called on the end (failure) of SSR. This could lead to possible memory leaks in custom SSR apps, if their singleton services' `ngOnDestroy` hooks contained an important teardown logic (e.g. unsubscribing from RxJS observable). Note: I needed to fix by the way another thing too: now we destroy `moduleRef` when `platformInjector` is destroyed - by setting a `PLATFORM_DESTROY_LISTENER` fixes #58111 PR Close #58112 |
||
|---|---|---|
| .. | ||
| bundled-domino.d.ts | ||
| domino_adapter.ts | ||
| http.ts | ||
| location.ts | ||
| platform-server.ts | ||
| platform_state.ts | ||
| private_export.ts | ||
| provide_server.ts | ||
| server.ts | ||
| server_events.ts | ||
| tokens.ts | ||
| transfer_state.ts | ||
| types.d.ts | ||
| utils.ts | ||
| version.ts | ||