Markus 5ce932ceb7 Work on #213
- properly categorize all patterns
- remove pattern list from readme
- minor fixes to readme
- removed "introduction" because its not a pattern and an error i
committed some time ago
2015-08-20 21:40:07 +02:00

633 B

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Object Pool object-pool /patterns/object-pool/ Creational Java

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

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)