16
General / Re: Can someone please help me understand what goes into allowing the use of "new"?
« on: September 04, 2016, 07:22:56 am »
New in C++ is not the same as new from C# or Java or the like. In C++ new allocates memory for your type and returns a pointer to the allocated memory which you must later deallocate or you will get memory leaks. Given that you don't know this already I would strongly advise against using new at all and instead look at using unique_ptr in c++11 and up.