How do you overload new and delete for a class?

Alex Rønne Petersen xtzgzorex at
Mon Jan 9 13:02:21 PST 2012

On 09-01-2012 20:41, Adrian Mercieca wrote:
> Hi,
> Can someone please provide an example regarding overloading new and delete
> for a class?
> Thanks a lot.

This is deprecated.

What you should be doing is using std.conv.emplace() with whatever 
allocator (say, malloc()) you wish to use.

- Alex

More information about the Digitalmars-d-learn mailing list