Safe method wont check dangling pointer?

via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 15 06:55:05 PDT 2014


On Tuesday, 15 April 2014 at 12:12:00 UTC, Steven Schveighoffer 
wrote:
> The malloc is allowed, but only GC.malloc. C's malloc is not 
> @safe as it requires free.

I think the reason is that it returns `void*` (needs a cast and 
has no length) and points to uninitialized memory, not because 
you need to free it manually. A memory leak is still memory safe.


More information about the Digitalmars-d mailing list