[ODE] Re: ALLOCA
John Miles
jmiles at pop.net
Fri Mar 5 14:22:19 MST 2004
> However - ODE is written in C++ - and it's EXTREMELY poor programming
> practice to use malloc/calloc/realloc/strdup/free in C++. You should
> ALWAYS use the C++ new/delete operators instead.
>
> I'm fairly horrified that we're even having this discussion!
Thatt's a religious (opinion-driven) issue, not carved in stone.
I use malloc/free all the time in C++, when the intent is to handle
construction explicitly. C++ constructors are horribly broken -- they can
cause hidden performance problems for objects stored in containers, and they
don't allow failure detection without dragging in a bunch of
exception-handling baggage -- so it's not unreasonable to use malloc and
free in combination with explicit initialization.
-- jm
>
>
More information about the ODE
mailing list