Added Object Pool description to README.md.
This commit is contained in:
		
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -25,6 +25,7 @@ Creational design patterns abstract the instantiation process. They help make a | |||||||
| * [Property](#property) | * [Property](#property) | ||||||
| * [Singleton](#singleton) | * [Singleton](#singleton) | ||||||
| * [Multiton](#multiton) | * [Multiton](#multiton) | ||||||
|  | * [Object Pool](#object-pool) | ||||||
|  |  | ||||||
| ### Structural Patterns | ### Structural Patterns | ||||||
|  |  | ||||||
| @@ -619,6 +620,15 @@ validation and for building to order | |||||||
| **Applicability:** Use the Private Class Data pattern when | **Applicability:** Use the Private Class Data pattern when | ||||||
| * You want to prevent write access to class data members | * You want to prevent write access to class data members | ||||||
|  |  | ||||||
|  | ## <a name="object-pool">Object Pool</a> [↑](#list-of-design-patterns) | ||||||
|  | **Intent:** When objects are expensive to create and they are needed only for short periods of time it is advantageous to utilize the Object Pool pattern. The Object Pool provides a cache for instantiated objects tracking which ones are in use and which are available. | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | **Applicability:** Use the Object Pool pattern when | ||||||
|  | * The objects are expensive to create (allocation cost) | ||||||
|  | * You need a large number of short-lived objects (memory fragmentation) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Frequently asked questions | # Frequently asked questions | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user