Final Mob Destroy Audit (#22728)

I've audited the entire destroy path between datum and human, this time
paying attention to byond's built-in vars to make sure that the built-in
refs are correctly being cleared. I've also gone and corrected some
null-access mistakes, which are most prominently caused by as anything
casts not being null checked, since as anything allows null entries in a
list to be read.

By far the worst offender I've found was the lack of clearing of the
atom.underlays var, which contains a list of refs. And when searching
for uses of this var across the repo, I've discovered it's associated
with an overwhelming majority of the remaining objects still in the hard
del trackers.
This commit is contained in:
VMSolidus
2026-06-19 14:18:33 +00:00
committed by GitHub
parent f1ac588b71
commit 206bb29d52
8 changed files with 23 additions and 9 deletions
+2 -1
View File
@@ -636,7 +636,8 @@ Most of these values are calculated from information configured at authortime in
last_location = null
regen_limb = null
regen_extra = null
. = ..()
nym = null
return ..()
/datum/dionastats/proc/do_blood_suck(var/mob/living/carbon/user, var/mob/living/carbon/human/H)
user.visible_message(SPAN_DANGER("[user] is trying to bite [H.name]."), SPAN_DANGER("You start biting \the [H], you both must stay still!"))
@@ -101,7 +101,6 @@
//Srom (Shared Dreaming)
srom_pulled_by = null
srom_pulling = null
bg = null //Just to be sure.
GLOB.human_mob_list -= src
GLOB.intent_listener -= src