#define cleanlist(l) if(istype(l,/list)) for(var/i in l) if(!i) l -= i
mob/Login()
var/obj
a = new
b = new
c = new
var/list/l = list(a,b,c)
src << l.len // 3
del a
del b
del c
cleanlist(l)
src << l.len // 0 with cleanlist, 3 without
Why can't items get removed from any lists that contained them automatically? Deleting list items replaces them with null while I'd consider it better to just remove it completely.