Disable GC entirely

Minas Mina minas_mina1990 at hotmail.co.uk
Mon Apr 8 07:24:06 PDT 2013


On Monday, 8 April 2013 at 13:01:18 UTC, Regan Heath wrote:

> I've always hated the fact that C++ has 2 memory models 
> new/delete and malloc/free and I've never liked new/delete 
> because it doesn't allow anything like realloc - why can't I 
> reallocate an array of char or wchar_t??
>

Try using malloc on something that contains a type with a 
constructor inside and you'll see. The constructor will not be 
called :)

malloc and friends are bad heritage due to C compatibility. I 
stay away from them.


More information about the Digitalmars-d mailing list