| 577 | ~FaceMemoryPool() = default; |
| 578 | |
| 579 | void Initialize() |
| 580 | { |
| 581 | this->Reset(); |
| 582 | // size the chunks based on the size of a quadrilateral |
| 583 | static constexpr int numberOfInitialChunks = 100; |
| 584 | this->NextChunkIndex = 0; |
| 585 | this->NextFaceIndex = 0; |
| 586 | this->Chunks.resize(numberOfInitialChunks, nullptr); |
| 587 | // Initialize the first chunk |
| 588 | // NOLINTNEXTLINE(modernize-make-shared) |
| 589 | this->Chunks[0] = std::shared_ptr<unsigned char>( |
| 590 | new unsigned char[FaceMemoryPool::ChunkSize], std::default_delete<unsigned char[]>()); |
| 591 | } |
| 592 | |
| 593 | void ResetIndices() |
| 594 | { |