3 ms·
The thing is... std::shared_ptr is slower than a modern GC. It also doesn't protect you from memory fragmentation. GC is indeed a hack: it approximates an infi
by Aeolos 11y ago
The thing is... std::shared_ptr is slower than a modern GC. It also doesn't protect you from memory fragmentation.
GC is indeed a hack: it approximates an infinite memory system on systems that have finite memory. Reference counting is a worse hack: it approximates a GC on languages/systems that can't afford a real GC.