But that it's IDisposable has no bearing on the GC algorithm - it will be called through the finalizer in GC if it's not deterministically disposed through the interface before the GC run.
I updated the test to reflect this. https://gist.github.com/2710007 On Wednesday, 16 May 2012 14:55:54 UTC+2, Patrick Steele wrote: > > I'm not sure that's an accurate test. I'm not saying the issue you're > seeing isn't real, but your test directly references an idisposable > object in the Assert. That alone will probably keep it from being > garbage collected. Or even if it has been marked for collection, it > may be resurrected due to your Assert. > > I think a better test would be to use a WeakReference to your instance. > > --- > Patrick Steele > http://weblogs.asp.net/psteele > > > On Wed, May 16, 2012 at 8:34 AM, Henrik <[email protected]> wrote: > > Here: https://gist.github.com/2710007 > > > > On Tuesday, 15 May 2012 22:27:42 UTC+2, Krzysztof Koźmic wrote: > >> > >> I'm not sure I understand. > >> > >> Do you have a failing test to demonstrate it? > >> > >> On 16/05/2012 6:06 AM, Henrik Feldt wrote: > >> > >> If it is resolved once, yes, but not otherwise. > >> > >> > >> > >> The problem is the otherwise. How do I do then? > >> > >> > >> > >> From: [email protected] > >> [mailto:[email protected]] On Behalf Of Krzysztof > Kozmic > >> Sent: den 15 maj 2012 12:02 > >> To: [email protected] > >> Subject: Re: Windsor w/ BackgroundFactoryMethod > >> > >> > >> > >> if it's IDisposable it will get disposed > >> > >> On 13/05/2012 10:24 AM, Henrik Feldt wrote: > >> > >> bump > >> > >> > >> > >> From: [email protected] > >> [mailto:[email protected]] On Behalf Of Henrik > >> Sent: den 9 maj 2012 00:47 > >> To: [email protected] > >> Subject: Windsor w/ BackgroundFactoryMethod > >> > >> > >> > >> I'm looking to initialize a component on a background thread, so I > hacked > >> something together. It looks like this: > >> > >> https://gist.github.com/2640092 > >> > >> It works really nice, except that of course the component isn't being > >> disposed unless something else that depends on it is resolved, meaning > >> there's a live component needing disposing which isn't being disposed. > >> > >> Where would I jack into Windsor 3 to provide a piece of logic stating, > >> that for this type of handler/component/burden (?) when the > container/kernel > >> is being disposed, also perform a resolve and then release call, for > this > >> component? > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Castle Project Users" group. > >> To view this discussion on the web visit > >> https://groups.google.com/d/msg/castle-project-users/-/GZa5mIdsbKgJ. > >> To post to this group, send email to > >> [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]. > >> For more options, visit this group at > >> http://groups.google.com/group/castle-project-users?hl=en. > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Castle Project Users" group. > >> To post to this group, send email to > >> [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]. > >> For more options, visit this group at > >> http://groups.google.com/group/castle-project-users?hl=en. > >> > >> > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Castle Project Users" group. > >> To post to this group, send email to > >> [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]. > >> For more options, visit this group at > >> http://groups.google.com/group/castle-project-users?hl=en. > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Castle Project Users" group. > >> To post to this group, send email to > >> [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]. > >> For more options, visit this group at > >> http://groups.google.com/group/castle-project-users?hl=en. > >> > >> > > -- > > You received this message because you are subscribed to the Google > Groups > > "Castle Project Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/castle-project-users/-/cjyCuX8UGfgJ. > > To post to this group, send email to > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > > http://groups.google.com/group/castle-project-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/Yq1cBYqyv1cJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
