What's the D way of allocating memory?

Dicebot public at dicebot.lv
Wed Aug 7 08:23:07 PDT 2013


On Wednesday, 7 August 2013 at 15:21:56 UTC, Gary Willoughby 
wrote:
> What's the D way of allocating memory? Do you guys just use 
> malloc() and free()? Or are there functions in phobos that 
> should be used? I just need a buffer of variable length 
> allocating every now and then.

Want it to be managed by GC: use `new`
Want to do manual management: use `malloc`


More information about the Digitalmars-d-learn mailing list