From 72b64a72ce960e224f1564658aa4d8d598046ef8 Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:47:02 -0500 Subject: [PATCH] [GBP NO UPDATE][READY FOR TM] Simplemob GC improvement (#19225) * Properly clears a simplemob references on GC * We're going the whole mile here --- code/modules/mob/living/simple_animal/simple_animal.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 02ec6dca1d3..a9a6db8742e 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -129,6 +129,8 @@ AddComponent(/datum/component/footstep, footstep_type) /mob/living/simple_animal/Destroy() + /// We need to clear the reference to where we're walking to properly GC + walk_to(src, 0) QDEL_NULL(pcollar) master_commander = null GLOB.simple_animals[AIStatus] -= src