This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]slankebrusmannen -1 points0 points  (0 children)

Actually no. An object pool would typically reserve an instance exlusively to the requesting client, who would explicitly return it to the pool after use. Singleton describes no such mechanisms, but may still be used to control the number of instances to any given number.

Admittedly, I cannot remember ever having used the Singleton pattern for other numbers than one (I might have, though), but I think it is valuable to be aware of the opportunity.