Object Pool

Noun · Development

Definitions

  1. A creational design pattern that maintains a set of pre-initialized, reusable objects — such as database connections or threads — rather than allocating and deallocating them on demand, reducing the overhead of expensive construction and garbage collection.

    In plain English: Keeping a stash of ready-to-use expensive resources so your program can borrow and return them instead of creating new ones each time.

    Example: "We use a connection pool of 20 Postgres connections so each request can borrow one instead of opening a fresh TCP handshake."

Related Terms