Deleting objects from TMTool after clearing from workspace

2 vues (au cours des 30 derniers jours)
Daniel
Daniel le 15 Mar 2021
Modifié(e) : Daniel le 4 Mai 2021
In testing new functions which use visa, we noticed out-of-memory errors when creating and clearing visa objects. This appears to be because they are saved in TMTool as well as the Workspace. Now, if the Workspace variable is cleared, the object remains in TMTool with no handle to delete it. Is there a way to generate new object habdles for TMTool Instrument Objects?

Réponse acceptée

Daniel
Daniel le 4 Mai 2021
Modifié(e) : Daniel le 4 Mai 2021
Turns out I forgot that 'instrfind' returns all the handles. Therefore,
fclose( instrfind( 'Status', 'open' ); delete( instrfind );
works.

Plus de réponses (1)

Pranav Verma
Pranav Verma le 19 Mar 2021
Hi Daniel,
You can try instrreset to disconnect and delete all the instrument objects.
Thanks
  1 commentaire
Daniel
Daniel le 4 Mai 2021
Turns out I forgot that 'instrfind' returns all the handles. Therefore,
fclose( instrfind( 'Status', 'open' ); delete( instrfind );
works.

Connectez-vous pour commenter.

Produits


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by