Why create a new instance of Builder upon each call to BuildUp

Jun 20, 2008 at 12:50 PM
Just out of curiosity, why does each UnityContainer create a new instance of Builder upon each call to DoBuildUp(), as opposed to using a cached instance?  


Jun 20, 2008 at 7:54 PM
Builder is pretty vestigial these days. It has no member data. As such, creating instances is pretty much free. I personally don't like to hold onto objects if there's nothing worth holding on to. Since every instance of Builder is the same as every other, and they're very cheap to create, there's no reason to hold onto a cached instance.

If we were using a language that supported global functions, Builder would just go away I expect.