• Manual
  • Scripting API
  • Changelog
  • License
🏷️ Namespaces
  • Zigurous.DataStructures
🧱 Classes
  • ArrayExtensions
  • ComparableExtensions
  • DictionaryExtensions
  • DoubleAccumulator
  • FixedUpdateStrategy
  • FloatAccumulator
  • HashCode
  • HashSetExtensions
  • Identifier
  • IntAccumulator
  • LateUpdateStrategy
  • ListExtensions
  • Modules<T>
  • NormalUpdateStrategy
  • ObjectPool<T>
  • QuaternionAccumulator
  • SingletonBehavior<T>
  • SortedSetExtensions
  • StringExtensions
  • UpdateBehavior
  • UpdateStrategy
  • ValueAccumulator<T>
  • Vector2Accumulator
  • Vector2IntAccumulator
  • Vector3Accumulator
  • Vector3IntAccumulator
  • Vector4Accumulator
🗂️ Structs
  • Bitmask
  • Bool3
  • ClampedRange
  • ColorRange
  • EulerRange
  • FloatRange
  • GridSize
  • IntRange
  • Quantity<T>
  • Range<T>
  • Size
  • UIntRange
  • UnitIntervalRange
  • Vector2Range
  • Vector3Range
  • Vector4Range
🎚️ Interfaces
  • IModular<T>
  • INumberRange<T>
  • IObjectPool<T>
  • IRange<T>
📋 Enums
  • UpdateMode
🗣️ Delegates
  • ArrayExtensions.Reducer<TSum, TElement>
  • ListExtensions.Reducer<TSum, TItem>
  • ObjectPool<T>.Generator
  • UpdateStrategy.UpdateAction

ObjectPool<T>.Dispose

Method in ObjectPool<T>


Declaration

public void Dispose()

Description

Disposes of all class resources.


Overload

Declaration

public void Dispose(Action<T> cleanup)

Description

Disposes of all class resources and invokes a cleanup function on each object in the pool. The cleanup function is useful, for example, if you want to destroy the objects when the pool is disposed.

Parameters

cleanupThe cleanup function to invoke on each object.