2 ms·
> I give my brain a break by using std::unique_ptr<HugeObject>. Unfortunately this comes at a cost. Most notably, now you're unnecessarily stressing the alloca
by mavam 11y ago
> I give my brain a break by using std::unique_ptr<HugeObject>.
Unfortunately this comes at a cost. Most notably, now you're unnecessarily stressing the allocator. But worse, you no longer enjoy the benefits of value semantics [1].
[1] https://akrzemi1.wordpress.com/2012/02/03/value-semantics/ https://akrzemi1.wordpress.com/2012/02/03/value-semantics/