| Contents | Index |
destroy(obj)
obj | Job or task object, or array of objects, to be deleted from job storage memory. |
destroy(obj) removes the job object reference or task object reference obj from the local session, and removes the object from the job manager memory. When obj is destroyed, it becomes an invalid object. You can remove an invalid object from the workspace with the clear command.
If multiple references to an object exist in the workspace, destroying one reference to that object invalidates all the remaining references to it. You should remove these remaining references from the workspace with the clear command.
If obj is an array of job objects and one of the objects cannot be destroyed, the other objects in the array are destroyed and a warning is returned.
The task objects contained in a job will also be destroyed when a job object is destroyed. This means that any references to those task objects will also be invalid.
Because its data is lost when you destroy an object, destroy should be used after output data has been retrieved from a job object.
Destroy a job and its tasks. Assume the default configuration identifies a job manager.
jm = findResource(); % Use default config
j = createJob(jm, 'Name', 'myjob');
t = createTask(j, @rand, 1, {10});
destroy(j);
clear t
clear j
Note that task t is also destroyed as part of job j.
Destroy all finished jobs on the job manager.
[p,q,r,f] = findJob(jm) destroy(f)
createJob | createTask | findJob | findTask

See how to solve large problems with minimal effort and reduce simulation time.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |