[EMCpp]Item-21 Prefer std::make_unique and std::make_shared to Direct Use of New
· β 5 min read
Compared to new
, make functions eliminate source code duplication, improve exception safety, and, for std::make_shard
and std::allocate_shared
, generate code that’s smaller and faster.