you are viewing a single comment's thread
view the rest of the comments
[–] 16 points 2 years ago (1 child)

I think it's debatable whether RAII should be called "memory management". Whether dealing with Rust or modern C++, you don't need to "manage" the memory beyond specifying a container that will determine its lifecycle behavior, and then you just let it drop.

You could certainly choose to manage it more granularly than that in Rust or C++, but in the vast majority of cases that would be considered bad practice.

That's a qualitatively different user experience than C or pre-2011 boostless C++ where you actually need to explicitly delete all your heap allocations and manually keep track of which pointers are still valid. Lumping both under "memory management" makes the term so broad that it almost loses its significance.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 11 points 2 years ago

    Yeah, as I understand, in the terms of language design theory, it is technically still "manual memory management". But since you don't end up writing malloc() and free(), many refer to it as "semi-automatic" instead, which certainly feels more accurate.

  • source
  • parent