What's the D way of allocating memory?
Gary Willoughby
dev at nomad.so
Thu Aug 8 13:14:42 PDT 2013
On Thursday, 8 August 2013 at 18:53:02 UTC, Dicebot wrote:
> On Thursday, 8 August 2013 at 18:35:06 UTC, Gary Willoughby
> wrote:
>> calloc is marked as nothrow but apparently throws
>> OutOfMemoryError on allocation failure? ..eh? O_o
>
> http://dlang.org/function.html
> Nothrow Functions:
> Nothrow functions do not throw any exceptions derived from
> class Exception.
>
> Error is not Exception (they are both Throwable though), Errors
> are considered non-recoverable and leaving program in invalid
> state. They are allowed even in nothrow functions.
Ah right thanks.
More information about the Digitalmars-d-learn
mailing list