null allowing @safe code to do unsafe stuff.

Timon Gehr timon.gehr at gmx.ch
Sun Mar 18 07:24:00 PDT 2012


On 03/18/2012 02:54 PM, deadalnix wrote:
> Given a class, that would create a very large object

This is the culprit.

> if instantiated,
> and a null reference, you can access memory in « raw mode ». This is
> @safe D code, but really isn't.
>
> As solution, @safe code should insert tests for null reference, or
> should prevent null to be used.

This is fighting symptoms.


More information about the Digitalmars-d mailing list