-
Notifications
You must be signed in to change notification settings - Fork 713
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
Investigate support for @preDestroy #593
Comments
Remo, I find that very interesting. Do you mean in general we need to provide some kind of a What do you think of the usage of interceptors? That potentially will give a different way of doing the Also, I was thinking of investigating of pairing them up with mixin style calls similar maybe to Django Rest Framework mixins http://www.django-rest-framework.org/tutorial/3-class-based-views/#using-mixins. or this article https://blog.mariusschulz.com/2017/05/26/typescript-2-2-mixin-classes The idea is to attach mixins than are used independently for each lifecycle call. What do you think? |
I'd like this very much. The typical case for me is working with Observables. If you subscribe to an observable within a service that is not a singleton, you should unsubscribe once the service is destroyed, otherwise you'll get notifications in a service that doesn't exist anymore. |
I'd would like this feature as well. Having @preDestroy would make the code more SOLID as now we have to handle some concerns out of bean definition. |
@remojansen @parisholley has |
I also don't see @remojansen why isn't it in the NPM package? |
#1319 - i don't think authors intend to push async changes until v6 |
i also have an old build of my initial PR here that has all of the working async functionality, though their may be slight differences between it and master: https://www.npmjs.com/package/@parisholley/inversify-async |
@parisholley, the documentation in the master branch is misleading: https://github.com/inversify/InversifyJS/blob/master/wiki/pre_destroy.md and https://github.com/inversify/InversifyJS/blob/master/wiki/deactivation_handler.md |
you are right. I don't know what happened with the wiki. hopefully we finish work on |
Investigate
@preDestroy
see #587 (comment) for more info...The text was updated successfully, but these errors were encountered: