Object Pool

noun

say it: “OB-jekt POOL” /ˈɑbdʒɛkt pul/

A set of ready-made objects that are lent out one at a time and given back for reuse, instead of making a new one for every request.

What is Object Pool?

An object pool keeps a set of ready-made objects to reuse instead of creating and throwing away new ones. Database connections are pooled because opening them is slow.

In a sentence

  • “The game keeps an object pool of 20 bullets: one is taken when fired and returned when it leaves the screen.”

Level: Master · More OOP terms at this level

Updated