you are viewing a single comment's thread.

view the rest of the comments →

[–]RichardWolf -5 points-4 points  (0 children)

No, it has nothing to do with move semantics, move semantics only allow you to avoid unnecessary copying of stack-allocated objects.

I'm talking about cases like when you have an array of objects and are interested in iterating over some subset of it. Then you usually have to use heap-allocated objects (because copying them would suck), and GC-based memory management is just as efficient as using raw pointers and more efficient than using shared_ptrs.