2 ms·
The compiler is required to put calls to nove constructors in specific placez, it doesnt change based on compiler or optimisation level. The problrm with retu
by CJefferson 13y ago
The compiler is required to put calls to nove constructors in specific placez, it doesnt change based on compiler or optimisation level.
The problrm with returning a pointer is now someone has to worry about when the memory that pointer refers to gets ckeaned up. In my current 50,000 line c++ project, there are exactly 3 places where I call new or malloc, and then have to manually worry about cleaning up the result.