deprecated delete and manual memory management

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Apr 26 14:49:21 PDT 2011


On 4/26/11, Daniel Gibson <metalcaedes at gmail.com> wrote:
> 2. you can even use different custom allocators for the same class at
> the same time (you'd have to be really careful not to screw that up by
> using the wrong deallocator for an Object)

Maybe the allocator could annotate the class somehow, and the
deallocator could check which allocator was used to create the object
so it can call the matching deallocator.

One way this could be done is through subclassing, but maybe that
would mess things up. And this would probably mean runtime checks as
well. I've never dealt with this before, but some ideas come to mind..


More information about the Digitalmars-d mailing list