{"action":"created","issue":{"url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/519","repository_url":"https://api.github.com/repos/simpleinjector/SimpleInjector","labels_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/519/labels{/name}","comments_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/519/comments","events_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/519/events","html_url":"https://github.com/simpleinjector/SimpleInjector/issues/519","id":300559577,"number":519,"title":"Consider adding finalize/dispose actions","user":{"login":"paulomorgado","id":470455,"avatar_url":"https://avatars0.githubusercontent.com/u/470455?v=4","gravatar_id":"","url":"https://api.github.com/users/paulomorgado","html_url":"https://github.com/paulomorgado","followers_url":"https://api.github.com/users/paulomorgado/followers","following_url":"https://api.github.com/users/paulomorgado/following{/other_user}","gists_url":"https://api.github.com/users/paulomorgado/gists{/gist_id}","starred_url":"https://api.github.com/users/paulomorgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulomorgado/subscriptions","organizations_url":"https://api.github.com/users/paulomorgado/orgs","repos_url":"https://api.github.com/users/paulomorgado/repos","events_url":"https://api.github.com/users/paulomorgado/events{/privacy}","received_events_url":"https://api.github.com/users/paulomorgado/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-27T09:50:30Z","updated_at":"2018-03-02T17:22:02Z","closed_at":null,"author_association":"NONE","body":"We can register an initializer action for registered types.\r\n\r\nIt would be nice to register an action for when the container is disposed.\r\n\r\nSometimes I have disposable objects that are only on instance creators that I would like to have disposed when the container disposes its disposables."},"comment":{"url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/comments/369989713","html_url":"https://github.com/simpleinjector/SimpleInjector/issues/519#issuecomment-369989713","issue_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/519","id":369989713,"user":{"login":"dotnetjunkie","id":1506621,"avatar_url":"https://avatars1.githubusercontent.com/u/1506621?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnetjunkie","html_url":"https://github.com/dotnetjunkie","followers_url":"https://api.github.com/users/dotnetjunkie/followers","following_url":"https://api.github.com/users/dotnetjunkie/following{/other_user}","gists_url":"https://api.github.com/users/dotnetjunkie/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnetjunkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnetjunkie/subscriptions","organizations_url":"https://api.github.com/users/dotnetjunkie/orgs","repos_url":"https://api.github.com/users/dotnetjunkie/repos","events_url":"https://api.github.com/users/dotnetjunkie/events{/privacy}","received_events_url":"https://api.github.com/users/dotnetjunkie/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T17:22:01Z","updated_at":"2018-03-02T17:22:01Z","author_association":"COLLABORATOR","body":"I'll keep this issue open. This is something we might want to simplify in the future. An issue solution for instance is to allow access to the container's internal `Scope` that is used to hold the disposable singletons. When the user has access to that, it will be trivial to register instances for disposal. For instance:\r\n\r\n``` c#\r\ncontainer.SingletonScope.RegisterForDisposal(myDisposable);\r\n```"}}
{"actor":{"display_login":"dotnetjunkie"}}