null allowing @safe code to do unsafe stuff.

deadalnix deadalnix at gmail.com
Sun Mar 18 06:54:14 PDT 2012


Given a class, that would create a very large object 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.


More information about the Digitalmars-d mailing list