Release all memory in the MemPools. If 'dst_pool' is non-NULL, transfers it to 'dst_pool'. Otherwise frees the memory.
| 107 | /// Release all memory in the MemPools. If 'dst_pool' is non-NULL, transfers it to |
| 108 | /// 'dst_pool'. Otherwise frees the memory. |
| 109 | void ReleaseResources(MemPool* dst_pool) { |
| 110 | if (dst_pool == nullptr) { |
| 111 | tuple_mem_pool.FreeAll(); |
| 112 | aux_mem_pool.FreeAll(); |
| 113 | } else { |
| 114 | dst_pool->AcquireData(&tuple_mem_pool, false); |
| 115 | dst_pool->AcquireData(&aux_mem_pool, false); |
| 116 | } |
| 117 | tuple_mem = nullptr; |
| 118 | } |
| 119 | |
| 120 | /// Finalize transfer of 'num_to_commit' tuples to 'dst_batch' and transfer memory to |
| 121 | /// 'dst_batch' if at the end of 'scratch_batch'. The tuples must not yet be |