<?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: Destruct static instance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278482#M1633576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Garbage collector&lt;/EM&gt; will delete object which once there is no reference pointing to it (so simply ensure you remove all references). This is the only way to destruct the object in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2011 05:19:55 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2011-10-07T05:19:55Z</dc:date>
    <item>
      <title>Destruct static instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278481#M1633575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a way to kill instance of static method? (not my class and i cant change it ) &lt;/P&gt;&lt;P&gt;in the class there is method get instance and I want that in RT process (during one session call ) to get new instance.&lt;/P&gt;&lt;P&gt;I would like to do that during RT process ,like destruct in other language .&lt;/P&gt;&lt;P&gt;I know that this is now simple but maybe there is a way in abap ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Joy Stpr on Oct 6, 2011 5:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 13:43:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278481#M1633575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-06T13:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Destruct static instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278482#M1633576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Garbage collector&lt;/EM&gt; will delete object which once there is no reference pointing to it (so simply ensure you remove all references). This is the only way to destruct the object in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 05:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278482#M1633576</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-10-07T05:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Destruct static instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278483#M1633577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i understand correctly the OP is facing this problem because "singleton" pattern is implemented in the class!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also afaik developer cannot trigger the Garbage Collector. So i was thinking if we can use the [C-destructor |http://help.sap.com/abapdocu_702/en/abenc_destructor.htm]call to destroy the static instance attribute of this class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 09:43:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278483#M1633577</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-10-10T09:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Destruct static instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278484#M1633578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Documentation of C-destuctor (nice to know that there is something like that) says it should only be used in special cases and for internal use only. I think the easies would be simply "unbinding" this static attribute which would cause Garbage Collector to pick refering object (itself) and delete it. I didn't say GC needs to be called directly &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 13:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278484#M1633578</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-10-10T13:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Destruct static instance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278485#M1633579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I didn't say GC needs to be called directly &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I bet you didn't &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm yet to understand GC's clandestine operations ... He he &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 02:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/destruct-static-instance/m-p/8278485#M1633579</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-10-11T02:25:38Z</dc:date>
    </item>
  </channel>
</rss>

