Effective Java's Item 2, is suggesting to use Builder pattern instead of using constructor with tons of parameters. I totally agree with it and whenever possible but I still have an open question that I return over and over:
- What's the memory overhead of using this pattern? Wouldn't it create a smudge of objects for each created instance? That would trigger quite a few GCs?
I looking forward for your impressions.
Aucun commentaire:
Enregistrer un commentaire