// MIT License - Copyright (c) 2026 wallstop // Full license text: https://github.com/wallstop/unity-helpers/blob/main/LICENSE namespace WallstopStudios.UnityHelpers.Utils { using System; /// /// Specifies the reason why an item was purged from a pool. /// Used in purge callbacks to distinguish between different removal scenarios. /// public enum PurgeReason { /// /// Reserved for uninitialized state. Do not use directly. /// [Obsolete("Use a specific PurgeReason value.")] Unknown = 0, /// /// The item was purged because it exceeded the idle timeout duration. /// This occurs when an item has been sitting unused in the pool for too long. /// IdleTimeout = 1, /// /// The item was purged because the pool exceeded its maximum size capacity. /// Oldest items are typically purged first when capacity is exceeded. /// CapacityExceeded = 2, /// /// The item was explicitly purged via a call to the Purge method. /// Explicit = 3, /// /// The item was purged due to memory pressure from the system. /// This occurs when is triggered. /// MemoryPressure = 4, /// /// The item was purged because the application was backgrounded. /// This occurs when the app loses focus, typically on mobile platforms. /// AppBackgrounded = 5, /// /// The item was purged because a scene was unloaded. /// This occurs when is triggered /// and is enabled. /// The purge respects hysteresis settings to avoid purge-allocate cycles during rapid scene transitions. /// SceneUnloaded = 6, /// /// The item was purged because the global pool memory budget was exceeded. /// This occurs when determines that /// the total pooled items across all pools exceeds . /// Pools are purged in LRU order (least recently accessed first). /// BudgetExceeded = 7, } }