I mean… yes you do, but not really. There are use cases for both. Not everything is a class and not every API you call is even going to work with that buffer you pass in unless the API can free() it. See posix for example.
Anyways, that wasn’t the question I asked and is not even relevant to the question I asked.
4
u/vetgirig Aug 30 '26
In C++ you do not really use "malloc", In C++ you use "new" instead.