← Back to context

Comment by AstralStorm

7 years ago

That's only if you do not use a library and/or have no idea how shared_ptr is implemented.

The standard library doesn't come with persistent collections included. Just the fact that they are not standard like in some other languages, causes fragmentation.

As for shared_ptr, they are a good idea when you don't care about performance. And they don't solve cycles, which may appear in some structures (e.g. graphs).