Chromium Code Reviews| Index: src/allocation.h |
| diff --git a/src/allocation.h b/src/allocation.h |
| index 75aba35d8cfcf0a4111cda2a8321693eb6372c7b..1011e62d18d2cdfd4b5b4929aacccf81fa7e2154 100644 |
| --- a/src/allocation.h |
| +++ b/src/allocation.h |
| @@ -51,6 +51,14 @@ class Malloced { |
| }; |
| +// Superclass for classes with custom allocation. |
| +class CustomlyAllocated { |
|
antonm
2011/04/06 11:01:48
I don't like the name, but I cannot come up with a
Vitaly Repeshko
2011/04/06 19:11:01
Yeah, since it requires hiding both new/delete and
|
| + private: |
| + void* operator new(size_t size); |
| + void operator delete(void* p); |
| +}; |
| + |
| + |
| // A macro is used for defining the base class used for embedded instances. |
| // The reason is some compilers allocate a minimum of one word for the |
| // superclass. The macro prevents the use of new & delete in debug mode. |