Freeing Partition Iterator

softwaregravy
Posts: 1
Joined: Sat Jan 14, 2023 4:13 pm

Freeing Partition Iterator

Postby softwaregravy » Sat Jan 14, 2023 4:22 pm

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?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 99 guests