Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(core): Add destroyed property on DestroyRef #61849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jun 3, 2025

Since DestroyRef.onDestroy throws if the DestroyRef is already
destroyed, there is a need to be able to tell if it is already destroyed
before attempting to register a callback.

(first commit is in #61847)

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: core Issues related to the framework runtime labels Jun 3, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 3, 2025
@atscott atscott force-pushed the destroyRefDestroyed branch from c024f45 to 2f893dc Compare June 3, 2025 18:24
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Since `DestroyRef.onDestroy` throws if the `DestroyRef` is already
destroyed, there is a need to be able to tell if it is already destroyed
before attempting to register a callback.
@atscott atscott force-pushed the destroyRefDestroyed branch from 2f893dc to 32fc7ee Compare June 4, 2025 17:24
@atscott atscott marked this pull request as ready for review June 4, 2025 17:24
@pullapprove pullapprove bot requested a review from AndrewKushnir June 4, 2025 17:24
@atscott atscott added the target: minor This PR is targeted for the next minor release label Jun 4, 2025
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jun 4, 2025
@kirjs
Copy link
Contributor

kirjs commented Jun 4, 2025

This PR was merged into the repository by commit 8163a89.

The changes were merged into the following branches: main

@kirjs kirjs closed this in 8163a89 Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants