[GBP NO UPDATE][READY FOR TM] Simplemob GC improvement (#19225)

* Properly clears a simplemob references on GC

* We're going the whole mile here
This commit is contained in:
GDN
2022-10-20 20:47:02 +01:00
committed by GitHub
parent 59c71079fb
commit 72b64a72ce
@@ -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