On Wed, Aug 14, 2024 at 05:33:13PM +0530, Chandra Pratap wrote: > block_iter_reset() restores a block iterator to its state at the time > of initialization without freeing any memory while block_iter_close() > deallocates the memory for the iterator. > > In the current testing setup, a block iterator is allocated and > deallocated for every iteration of a loop, which hurts performance. > Improve upon this by using block_iter_reset() at the start of each > iteration instead. This has the added benifit of testing > block_iter_reset(), which currently remains untested. I don't think that performance is a good argument, but exercising the reset function certainly is. > Similarly, remove reftable_record_release() for a reftable record > that is still in use. This is a welcome change, too, to verify that reading into the same record multiple times does not leak memory and otherwise works as expected. Patrick