Garbage Collection

Garbage Collection

Any system such as MATLAB that maintains an environment with variables continually being created and destroyed must have a form of ``garbage collection'' to remove dead (or unused) space. Unfortunately, MATLAB has no automatic garbage collection mechanism. The function clear allows the user to manage his workspace and do his own house cleaning. Even that is not enough, since other temporary arrays might be created and destroyed whenever M-files are run. In place of garbage collection, there is a MATLAB function called pack which saves all the variables in the entire workspace, clears the workspace, and then loads the saved variables. This is time-consuming, but it is the best way to get some room to work if memory limits start to hinder your progress.

http://www.eedsp.gatech.edu/Information/MATLAB_User_Guide/node18.html

你可能感兴趣的:(function,user,matlab,Arrays,System,variables)