Singleton-like template that allows you to create more than one instance in C #

Is there an implementation of a singleton template that allows you to create more than one instance (for example, 5 instances and no more). I guess this will be called the Multiton Pattern. thanks in advance

+5
source share
3 answers

Looks like you are trying to execute some kind of object pool?

If so, here is the solution I found with a quick google search. http://www.codeproject.com/KB/cs/DotNetObjectPool.aspx

, , SO, : ?

+6

.

+3

. Semaphore , .

, Monitor , .

+1

All Articles