I am a Java developer who has recently gotten into c++. I've read several times that the new operator should be avoided as variables declared with it must be manually deleted. But then my question becomes: why should I ever use it?
1 Answer
First, read this
You can use 'placement' new which allows you to take a chunk of memory and write the object onto it. This is the only case I've ever had to use new since smart pointers became a thing.