mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 14:58:39 +00:00
fbb12b53ba
I did the job and splitted up the readme, hopefully everything was splitted correctly...
606 B
606 B
layout, title, folder, categories, tags
| layout | title | folder | categories | tags |
|---|---|---|---|---|
| pattern | Object Pool | object-pool | pattern_cat | 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.
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)
