On Saturday, 30 October 2021 at 16:55:03 UTC, Steven Schveighoffer wrote: > auto v = k in aa; > aa.remove(k); > > How can the GC/compiler work out that there is still a > reference? ??? The same way it does for all other references. I think either you misunderstood me, or I misunderstood you.