<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Question about Core API function na_child_add() and na_elem_free() in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Question-about-Core-API-function-na-child-add-and-na-elem-free/m-p/24361#M208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that I have done the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;na_elem_t&amp;nbsp;&amp;nbsp; *pElem1 = NULL;&lt;/P&gt;&lt;P&gt;na_elem_t&amp;nbsp;&amp;nbsp; *pElem2 = NULL;&lt;/P&gt;&lt;P&gt;na_elem_t&amp;nbsp;&amp;nbsp; *pElem3 = NULL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pElem1 = na_elem_new("Element #1");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pElem2 = na_elem_new("Element #2");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pElem3 = na_child_add(pElem1, pElem2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then note that pElem3 == pElem2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it safe to assume that I only need to call na_elem_free() for pElem1 at this point because element #1 now "owns" the memory that was allocated to element #2, and calling na_elem_free() for element #1 will result in freeing the memory for both element #1 and element #2?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:55:01 GMT</pubDate>
    <dc:creator>eshropshire</dc:creator>
    <dc:date>2025-06-05T05:55:01Z</dc:date>
    <item>
      <title>Question about Core API function na_child_add() and na_elem_free()</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Question-about-Core-API-function-na-child-add-and-na-elem-free/m-p/24361#M208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that I have done the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;na_elem_t&amp;nbsp;&amp;nbsp; *pElem1 = NULL;&lt;/P&gt;&lt;P&gt;na_elem_t&amp;nbsp;&amp;nbsp; *pElem2 = NULL;&lt;/P&gt;&lt;P&gt;na_elem_t&amp;nbsp;&amp;nbsp; *pElem3 = NULL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pElem1 = na_elem_new("Element #1");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pElem2 = na_elem_new("Element #2");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pElem3 = na_child_add(pElem1, pElem2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then note that pElem3 == pElem2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it safe to assume that I only need to call na_elem_free() for pElem1 at this point because element #1 now "owns" the memory that was allocated to element #2, and calling na_elem_free() for element #1 will result in freeing the memory for both element #1 and element #2?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:55:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Question-about-Core-API-function-na-child-add-and-na-elem-free/m-p/24361#M208</guid>
      <dc:creator>eshropshire</dc:creator>
      <dc:date>2025-06-05T05:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Core API function na_child_add() and na_elem_free()</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Question-about-Core-API-function-na-child-add-and-na-elem-free/m-p/24364#M209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #454545; font-family: Arial, Helvetica, Verdana, sans-serif; background-color: #ffffff;"&gt;Yes, you just need to call na_elem_free() for element #1 that &lt;SPAN style="color: #454545; font-family: Arial, Helvetica, Verdana, sans-serif; background-color: #ffffff;"&gt;will result in freeing the memory for both element #1 and element #2&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 17:14:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Question-about-Core-API-function-na-child-add-and-na-elem-free/m-p/24364#M209</guid>
      <dc:creator>rkiran</dc:creator>
      <dc:date>2013-08-30T17:14:21Z</dc:date>
    </item>
  </channel>
</rss>

