| 258 | } |
| 259 | |
| 260 | void SortWindowBuild::finish() { |
| 261 | for (int i = 0; i < allocatedSizes_.size(); i++) { |
| 262 | if (allocatedSizes_[i] == 0) { |
| 263 | continue; |
| 264 | } |
| 265 | data_->pool()->free(allocatedStarts_[i], allocatedSizes_[i]); |
| 266 | allocatedSizes_[i] = 0; |
| 267 | } |
| 268 | sortRows_.clear(); |
| 269 | allocatedStarts_.clear(); |
| 270 | allocatedSizes_.clear(); |
| 271 | numBuffers_.clear(); |
| 272 | data_->clear(); |
| 273 | data_->pool()->release(); |
| 274 | } |
| 275 | |
| 276 | void SortWindowBuild::storeRows() { |
| 277 | BOLT_CHECK_GT(accumulatedLength_, 0); |