Yes, I did also mean it the way frob said it - I never use “new” directly, but most code that does not own the release of the ptr will obviously still get a pointer, or better yet, reference.
frob said:
so a raw pointer is best.
Actually, in C++, reference is best, unless “nullptr” is an actual valid parameter. I hope this is just lost in translation, but I see too many people still using pointers everywhere, even for non-nullable parameters, and it's really time this leftover C-nonsense is dorpped in C++ in 2025.
For things like arrays/strings we now have span/string_view… even less use-cases of actual *-ptrs. They do certainly exists, but way less in C++ than in C.