Class of memory pools for expressions.
More...
#include <func_sketch/expressions/expression_memory_pool.h>
Class of memory pools for expressions.
- Note
- This class releases memory when an instance is destroyed.
Definition at line 36 of file expression_memory_pool.h.
◆ ExpressionMemoryPool()
| func_sketch::expressions::ExpressionMemoryPool::ExpressionMemoryPool |
( |
| ) |
|
|
inline |
◆ create()
template<typename T, typename... Args>
| Expression * func_sketch::expressions::ExpressionMemoryPool::create |
( |
Args &&... | args | ) |
|
|
inlinenodiscard |
Create an expression.
- Template Parameters
-
| T | Type of the expression. |
| Args | Types of arguments. |
- Parameters
-
- Returns
- Created expression.
Definition at line 53 of file expression_memory_pool.h.
◆ destroy()
| void func_sketch::expressions::ExpressionMemoryPool::destroy |
( |
Expression * | expression | ) |
|
|
inlinenoexcept |
Destroy an expression including its child expressions.
- Parameters
-
- Note
- This function calls destructors of the expression and its child expressions. Memory is released when the memory pool is destroyed. Use of the expression after calling this function is undefined behavior.
-
This function does nothing if the argument is nullptr.
Definition at line 68 of file expression_memory_pool.h.
◆ memory_resource_
| std::pmr::monotonic_buffer_resource func_sketch::expressions::ExpressionMemoryPool::memory_resource_ |
|
private |
◆ allocator_
| std::pmr::polymorphic_allocator<Expression> func_sketch::expressions::ExpressionMemoryPool::allocator_ |
|
private |
The documentation for this class was generated from the following file: