<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240448</link>
    <title>MATLAB Central Newsreader - clear all does not clear all memory?</title>
    <description>Feed for thread: clear all does not clear all memory?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 04 Dec 2008 16:44:02 -0500</pubDate>
      <title>clear all does not clear all memory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240448#615080</link>
      <author>Joao </author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
I've been running some simple, but quite lengthy calculations in Matlab (R14).&lt;br&gt;
&lt;br&gt;
In order to save RAM, for each cycle, variables are cleared by a &quot;clear all&quot; command.&lt;br&gt;
&lt;br&gt;
But this does not solve everything, since I can tell by the Windows task manager that memory is still taken by Matlab (wich can exceed 1.5 GB) even after my program has crashed or ended, and even if I cleared all variables with a &quot;clear all&quot;. Memory is only freed if I shut down matlab and restart it.&lt;br&gt;
&lt;br&gt;
Is there any command that really clears all the cache?&lt;br&gt;
&lt;br&gt;
Thank you!&lt;br&gt;
&lt;br&gt;
&amp;nbsp;</description>
    </item>
    <item>
      <pubDate>Thu, 04 Dec 2008 21:33:02 -0500</pubDate>
      <title>Re: clear all does not clear all memory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240448#615135</link>
      <author>Praetorian</author>
      <description>On Dec 4, 9:44=A0am, &quot;Joao &quot; &amp;lt;joao_ama...@mail.pt&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I've been running some simple, but quite lengthy calculations in Matlab (=&lt;br&gt;
R14).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; In order to save RAM, for each cycle, variables are cleared by a &quot;clear a=&lt;br&gt;
ll&quot; command.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; But this does not solve everything, since I can tell by the Windows task =&lt;br&gt;
manager that memory is still taken by Matlab (wich can exceed 1.5 GB) even =&lt;br&gt;
after my program has crashed or ended, and even if I cleared all variables =&lt;br&gt;
with a &quot;clear all&quot;. Memory is only freed if I shut down matlab and restart =&lt;br&gt;
it.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there any command that really clears all the cache?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thank you!&lt;br&gt;
&lt;br&gt;
I don't know whether this will fix your problem but you could try&lt;br&gt;
running the PACK command after CLEAR ALL.&lt;br&gt;
&lt;br&gt;
HTH,&lt;br&gt;
Ashish.</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 11:54:02 -0500</pubDate>
      <title>Re: clear all does not clear all memory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240448#615222</link>
      <author>Joao </author>
      <description>Praetorian &amp;lt;ashish.sadanandan@gmail.com&amp;gt; wrote in message &amp;lt;34813a0b-28df-4e25-8a2f-a790fde16603@35g2000pry.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I don't know whether this will fix your problem but you could try&lt;br&gt;
&amp;gt; running the PACK command after CLEAR ALL.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; HTH,&lt;br&gt;
&amp;gt; Ashish.&lt;br&gt;
&lt;br&gt;
Hi, thanks for the reply.&lt;br&gt;
&lt;br&gt;
The pack command did not directly solve the problem, but helped me reach documentation that addresses this.&lt;br&gt;
&lt;br&gt;
No real solution, as this seems to be related to Win32 platform memory management. I actually solved this by using the matlab compiler and running the exe file. No more memory problems.&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
Joao</description>
    </item>
    <item>
      <pubDate>Thu, 23 Dec 2010 12:06:04 -0500</pubDate>
      <title>Re: clear all does not clear all memory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240448#807100</link>
      <author>Chintan </author>
      <description>&quot;Joao &quot; &amp;lt;joao_amaral@mail.pt&amp;gt; wrote in message &amp;lt;ghb4op$cd3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Praetorian &amp;lt;ashish.sadanandan@gmail.com&amp;gt; wrote in message &amp;lt;34813a0b-28df-4e25-8a2f-a790fde16603@35g2000pry.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I don't know whether this will fix your problem but you could try&lt;br&gt;
&amp;gt; &amp;gt; running the PACK command after CLEAR ALL.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; HTH,&lt;br&gt;
&amp;gt; &amp;gt; Ashish.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi, thanks for the reply.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The pack command did not directly solve the problem, but helped me reach documentation that addresses this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; No real solution, as this seems to be related to Win32 platform memory management. I actually solved this by using the matlab compiler and running the exe file. No more memory problems.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Cheers,&lt;br&gt;
&amp;gt; Joao&lt;br&gt;
&lt;br&gt;
Joao,&lt;br&gt;
&lt;br&gt;
In your post you mentioned that you were able to solve the issue using the compiler. I would really appreciate if you could provide more details on the same as it will help me in my project.&lt;br&gt;
&lt;br&gt;
Thank you and looking forward to your reply.&lt;br&gt;
&lt;br&gt;
-Chintan</description>
    </item>
  </channel>
</rss>

