Add missing new/delete overload in UseMemoryDomain

This commit is contained in:
Maxime Coste 2021-07-20 21:20:38 +10:00
parent 63b67d0f31
commit 3c1199f665

View File

@ -156,6 +156,12 @@ struct UseMemoryDomain
return ::operator new(size);
}
static void* operator new[](size_t size)
{
on_alloc(Domain, size);
return ::operator new[](size);
}
static void* operator new(size_t size, void* ptr)
{
return ::operator new(size, ptr);
@ -166,6 +172,12 @@ struct UseMemoryDomain
on_dealloc(Domain, size);
::operator delete(ptr);
}
static void operator delete[](void* ptr, size_t size)
{
on_dealloc(Domain, size);
::operator delete[](ptr);
}
};
}