could we change this back to `mem[index] = null`?