Files
java-design-patterns/object-pool/index.md
T
Markus fbb12b53ba Work towards #56: Splitting up the README
I did the job and splitted up the readme, hopefully everything was
splitted correctly...
2015-08-13 23:54:40 +02:00

19 lines
606 B
Markdown

---
layout: pattern
title: Object Pool
folder: object-pool
categories: pattern_cat
tags: pattern_tag
---
**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.
![alt text](./etc/object-pool.png "Object Pool")
**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)