Safe method wont check dangling pointer?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 15 10:03:35 PDT 2014


On 4/15/2014 2:33 AM, bearophile wrote:
> On the other hand the C/C++ world in the last years has seen
> numerous advancements that D should keep an eye on. If you look
> at the latest versions of LLVM-Clang and GCC you see various
> "sanitizers" (available as built-in tools of the compiler) that
> don't use too much memory, don't slow down your code too much,
> and catch dangling or wrong pointers, integer overflows,
> past-by-one errors, and more. One of those tools is less needed
> by D (thanks to the good management of the array bounds), but the
> others are nice.

Or you can use @safe, which doesn't slow your code down at all, at least for the 
memory corruption problems.



More information about the Digitalmars-d mailing list