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

Releasing singletons on low memory #212

Closed
dlemures opened this issue Apr 21, 2017 · 1 comment
Closed

Releasing singletons on low memory #212

dlemures opened this issue Apr 21, 2017 · 1 comment
Milestone

Comments

@dlemures
Copy link
Collaborator

dlemures commented Apr 21, 2017

Should we release singletons on low memory?

Would they be singletons in that case?
Isn't it obscure black magic for the user?
Isn't it user design problems?

@stephanenicolas stephanenicolas added this to the 2.0.0 milestone Apr 22, 2017
@stephanenicolas stephanenicolas changed the title Releasing singletons on low memory? Releasing singletons on low memory Apr 23, 2017
@stephanenicolas
Copy link
Owner

We should release all internal providers, but it is not possible to release all of them automatically as some can't recover their state. Thus, users should have full control over this. We should provide different mechanisms to let user makr things that can be released:

  • add an annotation @Releasable that can apply to a type that is injected
  • add .markAsReleasable() to the bindings API

@stephanenicolas stephanenicolas mentioned this issue Jul 3, 2017
19 tasks
@stephanenicolas stephanenicolas modified the milestones: 2.0.0, 3.0.0 Jan 31, 2019
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

No branches or pull requests

2 participants