<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>delete peers by peer manager</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11538/delete-peers-by-peer-manager</link><description>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&amp;#39;s an application is stuck.
It works only when i add peer_id_free () in implementation of pm_peer_delete_all ().
As</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jan 2016 16:33:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11538/delete-peers-by-peer-manager" /><item><title>RE: delete peers by peer manager</title><link>https://devzone.nordicsemi.com/thread/43610?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2016 16:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:185a6ffc-a516-44b5-83f8-f717919a51db</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The peer manager is still in experimental release, and there are some issues in the current release. Most likely what you experience at the moment is caused by that. You might try the following, it should do the same, but the best would be to wait for the next release where this will be fixed:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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(PM_PEER_ID_INVALID);
        pm_peer_delete(current_peer_id);
    }
} 
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>