nRF5_SDK_11.0.0-2.alpha. I create peer by peer_manager. When initializing the application, i delete them pm_peer_delete_all(). There's an application is stuck. It works only when i add peer_id_free () in implementation of pm_peer_delete_all (). As shown below. As far as it is correct, and why it works is only in such a case?
void pm_peer_delete_all(void)
{
pm_peer_id_t current_peer_id = PM_PEER_ID_INVALID;
while (pdb_next_peer_id_get(PM_PEER_ID_INVALID) != PM_PEER_ID_INVALID)
{
current_peer_id = pdb_next_peer_id_get(current_peer_id);
peer_id_free(current_peer_id); // [FIX]
pm_peer_delete(current_peer_id);
}
}