Initialization vs Assignment

"Luís "Luís
Sun Nov 3 08:08:44 PST 2013


On Sunday, 3 November 2013 at 16:01:44 UTC, jerro wrote:
>> Now we can't have an A as a member of X? (it would free a null 
>> pointer)
>
> Actually, there is nothing wrong with calling free on a null 
> pointer.
> From the C 89 standard:
>
>> The free function causes the space pointed to by ptr to be 
>> deallocated, that is, made available for further allocation. 
>> If ptr is a null pointer, no action occurs.

Oops, right, not the best example. But you get the motivating 
idea :-)


More information about the Digitalmars-d mailing list