<?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: memory deallocation for local objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152628#M1907033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, declarations are super fast, so there really is no performance hit of any consequence. Second - and learn this mantra - LOCAL GOOD, GLOBAL &lt;STRONG&gt;BAD&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of global variables must be kept at an absolute minimum. This is good programming practice and will make your programs more robust. Also, if you have many local declarations in a subroutine then that is an indication that you should modularise further - i.e. make more subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Communicate between subroutines using parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Except for a few places, as a good programmer you should worry far more about your program design, maintainability and readability than performance. Only break good programming when squeezing the last dribble of performance is an absolute requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2015 14:24:19 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2015-06-25T14:24:19Z</dc:date>
    <item>
      <title>memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152624#M1907029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus, i have a silly doubt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i declare 100 local objects in my subroutine. &lt;/P&gt;&lt;P&gt;Those objects will be allocated memory wen the subroutine is run.&lt;/P&gt;&lt;P&gt;When i leave the subroutine, will the memory be deallocated for all those local objects? or will it just clear the memory ?&lt;/P&gt;&lt;P&gt;And if i call the subroutines multiple times, will an allocation happen every time? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 19:08:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152624#M1907029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-24T19:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152625#M1907030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a great opportunity for you to use the memory analyser in debug. Write an example program, then debug it and use that memory analyser tool. See what happens. And report back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you're able to do this before someone spoonfeeds you the answer! &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1291/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 05:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152625#M1907030</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-06-25T05:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152626#M1907031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rojer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when ever control come out of form..endform what ever variable,constant are declared inside are memory deallocated .&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look on this&amp;nbsp; &lt;BR /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/732967" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 09:11:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152626#M1907031</guid>
      <dc:creator>SwadhinGhatuary</dc:creator>
      <dc:date>2015-06-25T09:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152627#M1907032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tried as you said &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1291/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; and i observed that memory for all local variables are released after the control comes out of the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So will it negatively impact the performance of my program if i call a subroutine with too many local declarations inside a loop, cause of the allocation process .&amp;nbsp; Is it better to declare them globally?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152627#M1907032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-25T11:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152628#M1907033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, declarations are super fast, so there really is no performance hit of any consequence. Second - and learn this mantra - LOCAL GOOD, GLOBAL &lt;STRONG&gt;BAD&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of global variables must be kept at an absolute minimum. This is good programming practice and will make your programs more robust. Also, if you have many local declarations in a subroutine then that is an indication that you should modularise further - i.e. make more subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Communicate between subroutines using parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Except for a few places, as a good programmer you should worry far more about your program design, maintainability and readability than performance. Only break good programming when squeezing the last dribble of performance is an absolute requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 14:24:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152628#M1907033</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-06-25T14:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152629#M1907034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Mathew ,&lt;/P&gt;&lt;P&gt;That's all i wanted to know,will keep in mind &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1291/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I can't find the 'Correct answer button' &lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1291/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 15:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152629#M1907034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-25T15:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: memory deallocation for local objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152630#M1907035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because this is a discussion rather than a question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 16:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/memory-deallocation-for-local-objects/m-p/11152630#M1907035</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-06-25T16:29:35Z</dc:date>
    </item>
  </channel>
</rss>

