<?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 Re: Destroy / free BADI instance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518359#M2004506</link>
    <description>&lt;P&gt;Yep, it will be easier to use a Factory, and if you have criteria for implementation, you could use the factory to manage MultiTon (multiple singleton, based on criteria you find the right instance)&lt;/P&gt;</description>
    <pubDate>Fri, 25 Mar 2022 12:59:51 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2022-03-25T12:59:51Z</dc:date>
    <item>
      <title>Destroy / free BADI instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518356#M2004503</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I am using own BADI's to handle different implementations based on several filter criteria.&lt;/P&gt;
  &lt;P&gt;The BADI's are used inside RFC function modules.&lt;/P&gt;
  &lt;P&gt;The external sytem is calling the RFC's within a session and is keeping the session open as long as necessary. This means it could be that within one session 2 times the same RFC is called.&lt;/P&gt;
  &lt;P&gt;Now I want to optimize the memory usage of this open session and furthermore avoid that first RFC call is maybe influencing anyhow the second call. I.e. if I have class attributes at BADI implementation which were changed.&lt;/P&gt;
  &lt;P&gt;Is ther something like a free object or any way to destroy a BADI instance after using it and before leaving the RFC function?&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 11:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518356#M2004503</guid>
      <dc:creator>christian_swonke</dc:creator>
      <dc:date>2022-03-25T11:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Destroy / free BADI instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518357#M2004504</link>
      <description>&lt;P&gt;In ABAP there is no standard way to clean memory from instance. When people will propose you Free or something else, this will only remove the link between the variable &amp;amp; the instance, but the instance stay in memory. &lt;/P&gt;&lt;P&gt;What you could do, is to use single instance class:  Design Patten SingleTon&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 12:08:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518357#M2004504</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-03-25T12:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Destroy / free BADI instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518358#M2004505</link>
      <description>&lt;P&gt;Hi Frederic, thanks for your answer.&lt;/P&gt;&lt;P&gt;I was also already thinking about using singleton pattern. But this would mean I have to avoid using BADIS at all and handle the creation via factory method/class. Right?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 12:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518358#M2004505</guid>
      <dc:creator>christian_swonke</dc:creator>
      <dc:date>2022-03-25T12:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Destroy / free BADI instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518359#M2004506</link>
      <description>&lt;P&gt;Yep, it will be easier to use a Factory, and if you have criteria for implementation, you could use the factory to manage MultiTon (multiple singleton, based on criteria you find the right instance)&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 12:59:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destroy-free-badi-instance/m-p/12518359#M2004506</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-03-25T12:59:51Z</dc:date>
    </item>
  </channel>
</rss>

