Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

@destroy lifecycle not called on every instance of non-singleton component #1204

Closed
Orp22 opened this issue Jan 14, 2021 · 4 comments
Closed
Labels

Comments

@Orp22
Copy link

Orp22 commented Jan 14, 2021

Hi,

i found that the @destroy lifecycle is only called on the last instance that was created from a non-singleton scoped component. It's not documented anywhere but i assume the expected behavior would be that it's called on every instance.

I already created a unit test as a repro case but i'm currently not allowed to push branches to this project.

What's the expected behavior and would you accept a PR to fix this?

Cheers,

Tobias

@KnisterPeter
Copy link
Owner

Sorry for th latest reply. That sounds like a bug indeed.
Please create a fork and then you can open a PR.

@KnisterPeter
Copy link
Owner

@Orp22 Tagging you just in case you didn't receive my notice

@KnisterPeter
Copy link
Owner

@Orp22 Still waiting for a PR. Not that you missunderstood me. I would appreciate and integrate your changes if you send me a PR. You don't need to keep a fork and maintain that.

@Orp22
Copy link
Author

Orp22 commented Feb 18, 2021

@KnisterPeter Yes, i haven't forgotten about the bug. I just recently moved apartments so i didn't have free time to take care of it. It's not that urgent for me/us as we rarely use non-singleton stores but i will open a PR with a fix as soon as i have it :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants