Manual memory management in D2
Tim Verweij
tjverweij at gmail.com
Tue Jul 13 16:19:55 PDT 2010
On 14 July 2010 00:50, Leandro Lucarella <luca at llucax.com.ar> wrote:
> Please, don't name them malloc() and free(), their names are highly
> associated with just asking for memory. If you ditch new and delete,
> just name them new() and delete() :). But maybe it isn't a good idea
> anyway because new/delete are highly associated with the GC (OTOH you
> can overload new/delete to use other allocators). Maybe create() and
> destroy()?
>
> They could accept an optional function pointer/delegate with the same
> signature as malloc/free to do the actual allocation/freeing and default
> to C's malloc/free.
>
>
This makes sense to me. I second these suggestions.
TimV
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100714/25194ca9/attachment.html>
More information about the Digitalmars-d
mailing list