From 1999e772f6df41e35dafb2e185f6ff49a31089bf Mon Sep 17 00:00:00 2001
From: Dean Herbert <pe@ppy.sh>
Date: Sun, 21 Jan 2024 10:31:27 +0900
Subject: [PATCH] Fix `FollowPointConnection` pool filling up when follow
 points are hidden

Closes https://github.com/ppy/osu/issues/26642.

I think this applied to all pooling cases here.
---
 .../Objects/Pooling/PooledDrawableWithLifetimeContainer.cs     | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/osu.Game/Rulesets/Objects/Pooling/PooledDrawableWithLifetimeContainer.cs b/osu.Game/Rulesets/Objects/Pooling/PooledDrawableWithLifetimeContainer.cs
index 3b45acc7bb..1b0176cae5 100644
--- a/osu.Game/Rulesets/Objects/Pooling/PooledDrawableWithLifetimeContainer.cs
+++ b/osu.Game/Rulesets/Objects/Pooling/PooledDrawableWithLifetimeContainer.cs
@@ -153,6 +153,9 @@ namespace osu.Game.Rulesets.Objects.Pooling
 
         protected override bool CheckChildrenLife()
         {
+            if (!IsPresent)
+                return false;
+
             bool aliveChanged = base.CheckChildrenLife();
             aliveChanged |= lifetimeManager.Update(Time.Current - PastLifetimeExtension, Time.Current + FutureLifetimeExtension);
             return aliveChanged;