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

[Fix] Add dispose param to singleton registration methods #15

Merged
merged 5 commits into from
Jan 24, 2024

Conversation

jinyus
Copy link
Contributor

@jinyus jinyus commented Jan 7, 2024

Fixes memory leak discussed here: #14

addServiceDefinition<T>(
ServiceDefinition<T>(
(container) => factory(container),
isSingleton: true,
dispose: dispose,

Choose a reason for hiding this comment

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

🤔

This looks correct. It seems like this was a actually a bug in the interface.

Sorry for the slow response, but I will get around to merging this soon.

Thanks 🙏🏼

@MelbourneDeveloper
Copy link
Owner

@jinyus the test coverage dropped a little bit, and this was in an important area

image

So, I added commit b4b73d3 to bump up the test coverage

@MelbourneDeveloper MelbourneDeveloper merged commit d0fac94 into MelbourneDeveloper:main Jan 24, 2024
1 check passed
@MelbourneDeveloper
Copy link
Owner

@jinyus your fix is live in beta version 2.0.1

https://pub.dev/packages/ioc_container/versions/2.0.1-beta

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

Successfully merging this pull request may close these issues.

2 participants