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
+1 -1
View File
@@ -99,7 +99,7 @@
for(var/J in 1 to components_of_type.len)
var/datum/component/C = components_of_type[J]
if(C.type != our_type) //but not over other exact matches
components_of_type.Insert(J, I)
components_of_type.Insert(J, src)
inserted = TRUE
break
if(!inserted)