The easiest would simply be to store the references in the sequence to begin with. The order would be kept by the sequence, and you're free to link to each object as you see fit. Of course this might hurt cache locality, so if that's of concern I guess you'd need to allocate chunks at a time or something.
- realloc and self referencing array problem r3c
- realloc and self referencing array problem PMunch
