@safe @nogc memory allocation

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 28 14:31:40 PDT 2014


> It is also because `malloc` can return null when out of memory 
> and `new` will throw an Error. Wrapper around `malloc` that 
> throws `OutOfMemoryError` on null can be considered of same 
> purity class as `new`.

Does this mean that I should write and use such a wrapper for 
malloc?

/Per


More information about the Digitalmars-d-learn mailing list