Gianugo Rabellino wrote:

I'm also still not completely sold on factories. Indeed, they work and
they're a brilliant solution, but am I the only one smelling hack and
workaround?
I didn't like this when I first saw it either. My thought was to have the Generator, etc. be thread safe and have it create an object that was passed around to all of its methods which would then be released when the pipeline lost track of it. However, I realized that in the end that that is more or less what the current implementation does, but just with different names attached to the objects. The major difference is that the setup and generate methods are in the dynamically created object instead of in the "factory" class. But does that really matter?