How to allocate an element of type T with value x in generic code?

John Colvin john.loughran.colvin at gmail.com
Wed Apr 3 10:16:41 PDT 2013


On Wednesday, 3 April 2013 at 16:13:02 UTC, Andrej Mitrovic wrote:
> On 4/3/13, John Colvin <john.loughran.colvin at gmail.com> wrote:
>> note: this is not C malloc, the memory is requested from and
>> managed by the GC.
>
> Shouldn't that call be GC.malloc? I don't see a module-scoped 
> malloc
> function anywhere except the C one in core.stdc.stdlib.

yes, you are correct.


More information about the Digitalmars-d-learn mailing list