Hacker News new | ask | show | jobs
by andsoitis 1265 days ago
I didn’t downvote and I don’t know C++, but I thought that the new and delete operators are how you manage dynamic memory allocation.

Is it not the way?

1 comments

no, it really isn't. mostly you don't need to manage objects dynamically at all (make them automatic) but if you do, use something like std::make_unique(...)