In the eternal GC vs RC wars, it always comes up that reference counting can also have unbounded pauses, because what if a really big tree of objects becomes garbage all at once.
But I haven't seen it mentioned that the same is true of owned data with RAII in C++/Rust.
Conversation
you also have to be really careful with recursive structures or they overflow the stack with destructor calls
1
1
e.g. unique_ptr looks like a smart way to do linked lists, but it isn't
1
You just need a custom destructor then, but yeah, it is indeed a footgun if you aren’t aware of it.


