23#if JUCE_ENABLE_ALLOCATION_HOOKS
38 l.newOrDeleteCalled();
44void*
operator new (
size_t s)
50void*
operator new[] (
size_t s)
56void operator delete (
void* p)
noexcept
62void operator delete[] (
void* p)
noexcept
68void operator delete (
void* p,
size_t)
noexcept
74void operator delete[] (
void* p,
size_t)
noexcept
84UnitTestAllocationChecker::UnitTestAllocationChecker (UnitTest& test)
87 getAllocationHooksForThread().addListener (
this);
90UnitTestAllocationChecker::~UnitTestAllocationChecker() noexcept
92 getAllocationHooksForThread().removeListener (
this);
93 unitTest.expectEquals ((
int) calls, 0,
"new or delete was incorrectly called while allocation checker was active");
96void UnitTestAllocationChecker::newOrDeleteCalled() noexcept { ++calls; }
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...