HapState.markDead

void markDead() @safe nothrow

Record that the owning hap has been destroyed.

Also releases the stored records: any surviving Registration, OneShotState or heap-anchored handle would otherwise pin the state and every handler closure the dead hap ever held. Registration methods check alive first, so observable behaviour is unchanged.