FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

java-design-patterns/object-pool at master · Hanney-Ryu/java-design-patterns · GitHub

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

layout pattern
title Object Pool
folder object-pool
permalink /patterns/object-pool/
pumlid JSV94SCm2030Lk829Fxf1cF6bWU1XYDkFtdcjxiD9Qc3o-LrPQvu0pW-_HnvrLx1JgR9cfrimf1wCD7XnW-sWsESsXPcicl0nFW1RB-PiYqp0KxwVo-VVTMKBm00
categories Creational
tags
Java
Difficulty-Beginner
Performance

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)

Back | FazBrowse Home | New Git URL