// Parent for arena allocated objects giving appropriate new and delete operators. template<enum ArenaAllocKind kAllocKind> class ArenaObject { public: // Allocate a new ArenaObject of 'size' bytes in the Arena. void* operatornew(size_t size, ArenaAllocator* allocator) { return allocator->Alloc(size, kAllocKind);
}
// Parent for arena allocated objects that get deleted, gives appropriate new and delete operators. template<enum ArenaAllocKind kAllocKind> class DeletableArenaObject { public: // Allocate a new ArenaObject of 'size' bytes in the Arena. void* operatornew(size_t size, ArenaAllocator* allocator) { return allocator->Alloc(size, kAllocKind);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.