I'm impressed how quickly I found help here and want to ask another question. Acutally it was posted on http://stackoverflow.com/questions/13372142/castle-windsor-is-it-ok-t... The scenario is to allocate a collection of objects created by typed factory, do some work not involving objects directly (write database), use objects in the collection (make web-service calls by means of those objects) and release them. I experience difficulties with releasing the collection of objects safely. Does typed factory support releasing a collection/array of components? Or what may happen if I release component right after I create it and the component has other components injected?
typed factory won't currently release collection of object, just individual objects.
Releasing an object doesn't mean the entire graph will be released. Lifestyle of each individual leaf in the graph is taken into account so it is generally safe to call release anytime you're done using the root object of the graph.
On Thursday, 15 November 2012 at 11:02 AM, Michael S. wrote:
> I'm impressed how quickly I found help here and want to ask another question. Acutally it was posted on http://stackoverflow.com/questions/13372142/castle-windsor-is-it-ok-t... > The scenario is to allocate a collection of objects created by typed factory, do some work not involving objects directly (write database), use objects in the collection (make web-service calls by means of those objects) and release them. I experience difficulties with releasing the collection of objects safely. Does typed factory support releasing a collection/array of components? Or what may happen if I release component right after I create it and the component has other components injected?
> -- > 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/-/6tSZNIg7nyEJ.
> To post to this group, send email to castle-project-users@googlegroups.com (mailto:castle-project-users@googlegroups.com).
> To unsubscribe from this group, send email to castle-project-users+unsubscribe@googlegroups.com (mailto:castle-project-users+unsubscribe@googlegroups.com).
> For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
On Thursday, November 15, 2012 5:07:52 AM UTC+4, Krzysztof Koźmic wrote:
> typed factory won't currently release collection of object, just > individual objects.
> Releasing an object doesn't mean the entire graph will be released. > Lifestyle of each individual leaf in the graph is taken into account so it > is generally safe to call release anytime you're done using the root object > of the graph.
> -- > Krzysztof Kozmic
> On Thursday, 15 November 2012 at 11:02 AM, Michael S. wrote:
> I'm impressed how quickly I found help here and want to ask another > question. Acutally it was posted on > http://stackoverflow.com/questions/13372142/castle-windsor-is-it-ok-t... > The scenario is to allocate a collection of objects created by typed > factory, do some work not involving objects directly (write database), use > objects in the collection (make web-service calls by means of those > objects) and release them. I experience difficulties with releasing the > collection of objects safely. Does typed factory support releasing a > collection/array of components? Or what may happen if I release component > right after I create it and the component has other components injected?
> -- > 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/-/6tSZNIg7nyEJ.
> To post to this group, send email to castle-pro...@googlegroups.com<javascript:>
> .
> To unsubscribe from this group, send email to > castle-project-users+unsubscribe@googlegroups.com <javascript:>.
> For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en.
On Thursday, 15 November 2012 at 11:23 AM, Michael S. wrote:
> Got it. And vice versa: it's generally unsafe to release object before it's going to be used, right?
> On Thursday, November 15, 2012 5:07:52 AM UTC+4, Krzysztof Koźmic wrote:
> > typed factory won't currently release collection of object, just individual objects.
> > Releasing an object doesn't mean the entire graph will be released. Lifestyle of each individual leaf in the graph is taken into account so it is generally safe to call release anytime you're done using the root object of the graph.
> > --
> > Krzysztof Kozmic
> > On Thursday, 15 November 2012 at 11:02 AM, Michael S. wrote:
> > > I'm impressed how quickly I found help here and want to ask another question. Acutally it was posted on http://stackoverflow.com/questions/13372142/castle-windsor-is-it-ok-t... > > > The scenario is to allocate a collection of objects created by typed factory, do some work not involving objects directly (write database), use objects in the collection (make web-service calls by means of those objects) and release them. I experience difficulties with releasing the collection of objects safely. Does typed factory support releasing a collection/array of components? Or what may happen if I release component right after I create it and the component has other components injected?
> > > --
> > > 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/-/6tSZNIg7nyEJ.
> > > To post to this group, send email to castle-pro...@googlegroups.com (javascript:).
> > > To unsubscribe from this group, send email to castle-project-users+unsubscribe@googlegroups.com (javascript:).
> > > 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/-/L5irN-q6R5AJ.
> To post to this group, send email to castle-project-users@googlegroups.com (mailto:castle-project-users@googlegroups.com).
> To unsubscribe from this group, send email to castle-project-users+unsubscribe@googlegroups.com (mailto:castle-project-users+unsubscribe@googlegroups.com).
> For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.