<?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>Memory Leak in Connection Parameters Negotiation module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41358/memory-leak-in-connection-parameters-negotiation-module</link><description>Good day! 
 
 In my BLE project I use connection parameters negotiation module. In order to ensure software consistency there is a test for memory leakage. After some investigations I&amp;#39;ve found, that function 
 ret_code_t ble_conn_params_init (const ble_conn_params_init_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Dec 2018 13:21:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41358/memory-leak-in-connection-parameters-negotiation-module" /><item><title>RE: Memory Leak in Connection Parameters Negotiation module</title><link>https://devzone.nordicsemi.com/thread/160999?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 13:21:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18dedc1-822c-4653-99f6-3eb0f389c09a</guid><dc:creator>ArmatureCurrent</dc:creator><description>&lt;p&gt;Thanks for your answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory Leak in Connection Parameters Negotiation module</title><link>https://devzone.nordicsemi.com/thread/160982?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 12:36:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a6f6b92-0467-466f-b98f-bf92461d8abe</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The normal (non-FreeRTOS) app-timer implementation relies entirely on static memory. As you have commented, this is not the case for the FreeRTOS implementation since it use&amp;nbsp;xTimerCreate(). However, I do not see this as a memory leak as the higher level app-timer API still treats this conceptually as a static allocation with the number of instances is fixed by the configuration define. And equally important: there is no app-timer API to tear down a timer once it has been created, so there is no reason to think that the memory should be freed at any point.&lt;/p&gt;
&lt;p&gt;If you want to change this behavior properly, then you need to expand the app-timer&amp;nbsp;API with a teardown function. Alternatively you could replace the call to &lt;span&gt;xTimerCreate()&amp;nbsp;&lt;/span&gt;with xTimerCreateStatic(). I do not see a significant benefit of it, though. I have created an internal ticket for this, but you should not probably expect this to be added in the next nRF5 SDK release (you are of course free to implement it yourself if you like).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>