Page 1 of 1

Freeing Partition Iterator

Posted: Sat Jan 14, 2023 4:22 pm
by softwaregravy
I am making a call to esp_partition_find and then esp_partition_next to find the partitions.

In the docs for esp_partition_find it says
Iterator obtained through this function has to be released using esp_partition_iterator_release when not used any more.
If I just call esp_partition_next repeatedly until it returns NULL, do I still have to try and free the iterator? Do I need to keep a handle to it? Or does esp_partition_next handle free-ing the iterator when it returns NULL?