diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp index 59e41b18e9..2f73683236 100644 --- a/src/common/classes/alloc.cpp +++ b/src/common/classes/alloc.cpp @@ -2963,4 +2963,15 @@ void* operator new[](size_t s) FB_THROW (OOM_EXCEPTION) { return MemoryPool::globalAlloc(s ALLOC_ARGS); } + +void operator delete(void* mem) FB_NOTHROW +{ + MemoryPool::globalFree(mem); +} + +void operator delete[](void* mem) FB_NOTHROW +{ + MemoryPool::globalFree(mem); +} + #endif // DEBUG_GDS_ALLOC diff --git a/src/common/classes/alloc.h b/src/common/classes/alloc.h index 845a87e826..1bd23a58d0 100644 --- a/src/common/classes/alloc.h +++ b/src/common/classes/alloc.h @@ -396,23 +396,8 @@ inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) FB_NOTHROW #ifdef DEBUG_GDS_ALLOC -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Winline-new-delete" -#endif - -inline void operator delete(void* mem) FB_NOTHROW -{ - MemoryPool::globalFree(mem); -} -inline void operator delete[](void* mem) FB_NOTHROW -{ - MemoryPool::globalFree(mem); -} - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +extern void operator delete(void* mem) FB_NOTHROW; +extern void operator delete[](void* mem) FB_NOTHROW; #endif // DEBUG_GDS_ALLOC