File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/core/src/change_detection/scheduling Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ import {
3131} from './zoneless_scheduling' ;
3232import { SCHEDULE_IN_ROOT_ZONE_DEFAULT } from './flags' ;
3333import { INTERNAL_APPLICATION_ERROR_HANDLER } from '../../error_handler' ;
34+ import { OnDestroy } from '../lifecycle_hooks' ;
3435
3536@Injectable ( { providedIn : 'root' } )
36- export class NgZoneChangeDetectionScheduler {
37+ export class NgZoneChangeDetectionScheduler implements OnDestroy {
3738 private readonly zone = inject ( NgZone ) ;
3839 private readonly changeDetectionScheduler = inject ( ChangeDetectionScheduler ) ;
3940 private readonly applicationRef = inject ( ApplicationRef ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import {
3131} from './zoneless_scheduling' ;
3232import { TracingService } from '../../application/tracing' ;
3333import { INTERNAL_APPLICATION_ERROR_HANDLER } from '../../error_handler' ;
34+ import { OnDestroy } from '../lifecycle_hooks' ;
3435
3536const CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT = 100 ;
3637let consecutiveMicrotaskNotifications = 0 ;
@@ -56,7 +57,7 @@ function trackMicrotaskNotificationForDebugging() {
5657}
5758
5859@Injectable ( { providedIn : 'root' } )
59- export class ChangeDetectionSchedulerImpl implements ChangeDetectionScheduler {
60+ export class ChangeDetectionSchedulerImpl implements ChangeDetectionScheduler , OnDestroy {
6061 private readonly applicationErrorHandler = inject ( INTERNAL_APPLICATION_ERROR_HANDLER ) ;
6162 private readonly appRef = inject ( ApplicationRef ) ;
6263 private readonly taskService = inject ( PendingTasksInternal ) ;
You can’t perform that action at this time.
0 commit comments