Re:How fast can you allocate a large block of memory in C++?
by rcxdude on Friday January 17, 2020 @03:02PM
(#22078603)
That's not the point. Smart pointer implementations aren't some dark magic, they're just the opposite: mostly fairly simple to implement (shared_ptr is a little trickier), and obviously right by construction: the compiler does the hard work of making sure the constructors and destructors get called appropriately (and this is a little harder but still far far easier than making sure that malloc() and free() match in all actual uses).
[ Parent
| on HN ]
There are no comments on this comment yet.