But my point is that storing them in another array doesn't buy you a lot if you allow deallocations (you can then still have a use-after-free, or even read the wrong object) while if you don't deallocate you might as well just use pointers.
Just trying to understand the benefit of going to all this work. I can see the point in old FORTRAN code before FORTRAN 90
But I’ve worked with indexed classes (mixin class) to avoid pointers in the past and have never found them worth the effort. Since someone else is mentioning it here on HN I’m asking if there is an advantage over pointers that I don’t realise — if so I might be glad to take advantage of it myself.
https://www.dropbox.com/s/mmi46lxk8ipoci0/Principles%20of%20...