3 ms·
The problem with memory management is that, in any large system, you invariably have a situation where multiple need to share ownership of a resource (think std
by jcranmer 11y ago
The problem with memory management is that, in any large system, you invariably have a situation where multiple need to share ownership of a resource (think std::shared_ptr or Rusts' Rc<T>). And in large systems, such ownership graphs may form cycles.
Now you can build systems that detect cycles who lack ownership outside of the cycle and break them. We call those systems garbage collectors.