Skip to content
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

Dynamically injected dependency behaves like a Singleton #2

Closed
jakubmikita opened this issue Jun 15, 2017 · 2 comments
Closed

Dynamically injected dependency behaves like a Singleton #2

jakubmikita opened this issue Jun 15, 2017 · 2 comments
Assignees
Labels

Comments

@jakubmikita
Copy link

When you have a class Class which depends on class Dependency and call Class 2 times, it will have the same instance of Dependency injected.

Please check the attached zip for proof. It's just printing a random number. container-make-test.zip

This is how it should be done? It's quite misleading when you have many dependencies not registered as singletons and I'd consider it a bug.

@lucatume lucatume self-assigned this Jun 15, 2017
@lucatume lucatume added the bug label Jun 15, 2017
@jakubmikita
Copy link
Author

Thanks for fast reaction. I can confirm it's working as expected now

@lucatume
Copy link
Owner

You are more than welcome, and thanks to you for the detailed report.
I see now my previous reply never made it here but wanted to thank you for the issue.

Happy coding!

lucatume pushed a commit that referenced this issue Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants