<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, clear variable from MEMORY</title>
    <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sat, 13 Jun 2026 18:19:00 GMT</lastBuildDate>
    <pubDate>Sat, 13 Jun 2026 18:19:00 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, clear variable from MEMORY</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, clear variable from MEMORY</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY</link>
    </image>
    <item>
      <title>gc()</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY?ref=Feed:MaplePrimes:clear variable from MEMORY:Comments#answer44060</link>
      <itunes:summary>&lt;p&gt;You still need to do &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=gc"&gt;garbage collection&lt;/a&gt; to free memory.&amp;nbsp;&lt;/p&gt;

&lt;div style="background:#eee;border:1px solid #ccc;padding:5px 10px;"&gt;&lt;span style="font-family:courier new,courier,monospace;"&gt;gc();&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</itunes:summary>
      <description>&lt;p&gt;You still need to do &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=gc"&gt;garbage collection&lt;/a&gt; to free memory.&amp;nbsp;&lt;/p&gt;

&lt;div style="background:#eee;border:1px solid #ccc;padding:5px 10px;"&gt;&lt;span style="font-family:courier new,courier,monospace;"&gt;gc();&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <guid>44060</guid>
      <pubDate>Wed, 17 Mar 2010 18:05:51 Z</pubDate>
      <itunes:author>Christopher2222</itunes:author>
      <author>Christopher2222</author>
    </item>
    <item>
      <title>The command is...</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY?ref=Feed:MaplePrimes:clear variable from MEMORY:Comments#answer96796</link>
      <itunes:summary>&lt;p&gt;The command is unassign(varname).&lt;/p&gt;
&lt;p&gt;The memory allocation shown in the bottom r.h.s. corner of the GUI suggests no memory has been freed up; watching the value of kernelopts gcbytesavail and gcbytesreturned suggest garbage is hanging around waiting to be collected, and that this is being done on a call to gc(), but kernelopts memusage suggests the memory is being freed and garbage collected right away.&lt;/p&gt;
&lt;p&gt;I'd be inclined to believe kernelopts before the GUI display, BUT given that Maple is crashing for me inspite of my use of unassign, I could be completely wrong in doing so!&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The command is unassign(varname).&lt;/p&gt;
&lt;p&gt;The memory allocation shown in the bottom r.h.s. corner of the GUI suggests no memory has been freed up; watching the value of kernelopts gcbytesavail and gcbytesreturned suggest garbage is hanging around waiting to be collected, and that this is being done on a call to gc(), but kernelopts memusage suggests the memory is being freed and garbage collected right away.&lt;/p&gt;
&lt;p&gt;I'd be inclined to believe kernelopts before the GUI display, BUT given that Maple is crashing for me inspite of my use of unassign, I could be completely wrong in doing so!&lt;/p&gt;</description>
      <guid>96796</guid>
      <pubDate>Sat, 11 Sep 2010 17:16:47 Z</pubDate>
      <itunes:author>RockHyrax</itunes:author>
      <author>RockHyrax</author>
    </item>
    <item>
      <title>realtime memory</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY?ref=Feed:MaplePrimes:clear variable from MEMORY:Comments#answer96799</link>
      <itunes:summary>&lt;p&gt;Is realtime memory usage needed?&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Is realtime memory usage needed?&lt;/p&gt;</description>
      <guid>96799</guid>
      <pubDate>Sat, 11 Sep 2010 19:33:24 Z</pubDate>
      <itunes:author>Christopher2222</itunes:author>
      <author>Christopher2222</author>
    </item>
    <item>
      <title>forget(.., x)</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY?ref=Feed:MaplePrimes:clear variable from MEMORY:Comments#answer239862</link>
      <itunes:summary>&lt;p&gt;Hi&lt;br /&gt;
Your question sounds to me a bit subject to interpretation. A variable, say &amp;#39;x&amp;#39;, is &amp;quot;in memory&amp;quot; in that it is either assigned something, or it is in the remember tables.&lt;/p&gt;

&lt;p&gt;If it is assigned, you &amp;#39;clear&amp;#39; x by entering x := &amp;#39;x&amp;#39;, you know, just unuassigning. it&lt;/p&gt;

&lt;p&gt;Clearing &amp;#39;x&amp;#39; from all remember tables is trickier but implemented in recent Maples: From the help page of forget: &amp;quot;&lt;em&gt;forget(..,x), which will clear all remembered entries in the system that reference x.&lt;/em&gt;&amp;quot;&lt;/p&gt;

&lt;p&gt;So in both cases you do not need to restart. If however you restart you clear the memory that the Maple system as as whole is taking, and for that, as people already said in this thread, using the&amp;nbsp;gc (garbage collector) also allows you to do some of this &amp;quot;free the memory that the system is not using&amp;quot; without restarting; note that the memory freed via gc is mostly that from remember tables.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Edgardo S. Cheb-Terrab&lt;br /&gt;
Physics, Differential Equations and Mathematical Functions, Maplesoft&lt;/p&gt;
</itunes:summary>
      <description>&lt;p&gt;Hi&lt;br /&gt;
Your question sounds to me a bit subject to interpretation. A variable, say &amp;#39;x&amp;#39;, is &amp;quot;in memory&amp;quot; in that it is either assigned something, or it is in the remember tables.&lt;/p&gt;

&lt;p&gt;If it is assigned, you &amp;#39;clear&amp;#39; x by entering x := &amp;#39;x&amp;#39;, you know, just unuassigning. it&lt;/p&gt;

&lt;p&gt;Clearing &amp;#39;x&amp;#39; from all remember tables is trickier but implemented in recent Maples: From the help page of forget: &amp;quot;&lt;em&gt;forget(..,x), which will clear all remembered entries in the system that reference x.&lt;/em&gt;&amp;quot;&lt;/p&gt;

&lt;p&gt;So in both cases you do not need to restart. If however you restart you clear the memory that the Maple system as as whole is taking, and for that, as people already said in this thread, using the&amp;nbsp;gc (garbage collector) also allows you to do some of this &amp;quot;free the memory that the system is not using&amp;quot; without restarting; note that the memory freed via gc is mostly that from remember tables.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Edgardo S. Cheb-Terrab&lt;br /&gt;
Physics, Differential Equations and Mathematical Functions, Maplesoft&lt;/p&gt;
</description>
      <guid>239862</guid>
      <pubDate>Wed, 05 Jul 2017 18:50:03 Z</pubDate>
      <itunes:author>ecterrab</itunes:author>
      <author>ecterrab</author>
    </item>
    <item>
      <title>gc() does not seem to change</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY?ref=Feed:MaplePrimes:clear variable from MEMORY:Comments#comment44061</link>
      <itunes:summary>&lt;p&gt;gc() does not seem to change the amount of memory (in the bottom right corner of the maple window) at all.&lt;/p&gt;
&lt;p&gt;Even after I undefined some variables by applying commands such as&lt;/p&gt;
&lt;p&gt;R:='R'&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;gc() does not seem to change the amount of memory (in the bottom right corner of the maple window) at all.&lt;/p&gt;
&lt;p&gt;Even after I undefined some variables by applying commands such as&lt;/p&gt;
&lt;p&gt;R:='R'&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>44061</guid>
      <pubDate>Wed, 17 Mar 2010 19:01:51 Z</pubDate>
      <itunes:author>ndattani</itunes:author>
      <author>ndattani</author>
    </item>
    <item>
      <title>The bottom right corner only</title>
      <link>http://www.mapleprimes.com/questions/35491-Clear-Variable-From-MEMORY?ref=Feed:MaplePrimes:clear variable from MEMORY:Comments#comment44062</link>
      <itunes:summary>&lt;p&gt;The bottom right corner only gives you information on the amount of memory used up until that point.&amp;nbsp; It doesn't give you a &amp;quot;real-time&amp;quot; tally of the amount of memory available.&lt;/p&gt;
&lt;p&gt;The restart command does unassign all variables, but it doesn't necessarily purge the system's memory of its content.&amp;nbsp; That's what the gc command does.&amp;nbsp; The &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=restart"&gt;?restart&lt;/a&gt; help page will provide more details on what exactly is reset.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The bottom right corner only gives you information on the amount of memory used up until that point.&amp;nbsp; It doesn't give you a &amp;quot;real-time&amp;quot; tally of the amount of memory available.&lt;/p&gt;
&lt;p&gt;The restart command does unassign all variables, but it doesn't necessarily purge the system's memory of its content.&amp;nbsp; That's what the gc command does.&amp;nbsp; The &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=restart"&gt;?restart&lt;/a&gt; help page will provide more details on what exactly is reset.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>44062</guid>
      <pubDate>Wed, 17 Mar 2010 19:42:44 Z</pubDate>
      <itunes:author>mjs</itunes:author>
      <author>mjs</author>
    </item>
  </channel>
</rss>