Abraxas/CCS Home Table of Contents
ABRAXAS SOFTWARE - CodeCheck CCS Test-Suite
CCS -C Test Suite for Module - 45.cpp
// 45) Always provide new and delete together.
typedef int size_t;
// verify that the new & deletes balance
class C45A {
static void * operator new(size_t);
static void operator delete(void*, size_t);
};
class C45B {
static void * operator new(size_t);
// bad 45, for C45B the delete is missing
// static void * operator delete(void*, size_t);
operator delete(void*, size_t);
};
Abraxas/CCS Home Table of Contents