Rosetta Code:Village Pump/C++ edits: Difference between revisions
Rosetta Code:Village Pump/C++ edits (view source)
Revision as of 05:19, 8 August 2009
, 14 years agoIn favor of malloc? Not likely.
(new int[n] deprecated? i don't think so) |
(In favor of malloc? Not likely.) |
||
Line 7:
::: Of course there are no clues about a deprecation of the new operator to (m)allocate, around here and there, or I am not able to seek at all. --[[User:ShinTakezou|ShinTakezou]] 22:00, 7 August 2009 (UTC)
:::: ''''new'''' is preferred over malloc in all cases I'm familiar with. When used on a type with a constructor, it runs the constructor. When used on a type where the '''new''' operator is overloaded, it runs the overload. malloc() isn't so easy to hook into. --[[User:Short Circuit|Short Circuit]] 05:19, 8 August 2009 (UTC)
|