Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: src/allocation.h

Issue 6800003: Make object groups and implicit references a bit more lightweight. (Closed)
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/global-handles.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/global-handles.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698