On 14 July 2010 00:50, Leandro Lucarella <[email protected]> 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

Reply via email to