Earlier quoted context omitted.
Weak_ptr in C++ only applies to shared_ptr, which is not used for most C++ pointers. Because of the atomic ops done on each copy, in performance sensitive contexts people aren't going to be using it.
Been there, done that. I was writing an interpreter using shared ptrs all over the place. Performance was fine until I linked pthreads, at which point it took a nosedive forcing me to refactor the entire project. No one really tells you this. People will say don't use shared ptrs because they're slow, which is far from the whole truth. They're pretty darn fast as long as you don't enable threading.
I am doing that :/
In Object Pascal it is the standard memory management way. All strings and arrays are reference counted, and so I use it for all my own data structures as well
I have not even added threading and I doubt I will, but the reference counting is already the slowest part
Not sure what the alternative is