---
title: "Object Pools - s&box library"
description: "Just a regular list based object pool."
canonical: "https://sbox.watch/libraries/hotpot/objectpools/"
generated_at: "2026-07-23T00:02:23.701Z"
---

# Object Pools

Just a regular list based object pool.

- Type: library
- Ident: hotpot.objectpools
- Creator: hotdawg
- Canonical: https://sbox.watch/libraries/hotpot/objectpools/
- Markdown: https://sbox.watch/libraries/hotpot/objectpools.md
- sbox.game: https://sbox.game/hotpot/objectpools/
- Generated: 2026-07-23T00:02:23.701Z

## Stats

- 24h momentum: +0
- Terry score: --
- Favorites: 0
- Upvotes: 0
- Downvotes: 0
- Updated: Jun 11, 2025
- Created: Jun 11, 2025
- Size: 3.7 KB
- Files: 2
- Tags: object, pool, pooling

## Description

Example
using ObjectPools;

public sealed class TestObjectPool : Component
{
 \[Property\] private GameObject prefab { get; set; }

 private ObjectPool<GameObject> \_pool;

 protected override void OnStart()
 {
 \_pool = new ObjectPool<GameObject>(
 OnCreate,
 OnGet,
 OnRelease,
 OnDestroy,
 defaultCapacity: 10,
 maxAmount: 10000,
 collectionCheck: true);
 }

 GameObject OnCreate()
 {
 return prefab.Clone();
 }

 void OnGet(GameObject obj)
 {
 obj.Enabled = true;
 }

 void OnRelease(GameObject obj)
 {
 obj.Enabled = false;
 }

 void OnDestroy(GameObject obj)
 {
 obj.Destroy();
 }
}



## More by hotdawg

| Package | Ident | Players | Favorites | Upvotes | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Chit Chat Dialogue System | hotpot.chitchat | 0 | 5 | 4 | 60% | https://sbox.watch/libraries/hotpot/chitchat.md |
