1.1 --- a/memory/memory_preallocated.cc Sat Mar 27 22:12:12 2021 +0100
1.2 +++ b/memory/memory_preallocated.cc Sun Mar 28 22:38:45 2021 +0200
1.3 @@ -22,6 +22,19 @@
1.4 }
1.5 }
1.6
1.7 +/* Discard all unused regions. */
1.8 +
1.9 +MemoryPreallocated::~MemoryPreallocated()
1.10 +{
1.11 + while (!_regions.empty())
1.12 + {
1.13 + Region *region = _regions.front();
1.14 +
1.15 + _regions.pop_front();
1.16 + _memory->release(region);
1.17 + }
1.18 +}
1.19 +
1.20 /* Obtain an allocated region. */
1.21
1.22 Region *MemoryPreallocated::region()