| 54 | } |
| 55 | |
| 56 | static void createPolymorphic(T& obj, pointer_utils::PolyAllocWithTypeId alloc, |
| 57 | const std::shared_ptr<PolymorphicHandlerBase>& handler) { |
| 58 | obj = static_cast<TElement*>(handler->create(alloc)); |
| 59 | } |
| 60 | |
| 61 | static void destroy(T& obj, pointer_utils::PolyAllocWithTypeId alloc, size_t typeId) { |
| 62 | alloc.deleteObject(obj, typeId); |