• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. how to delete variable or clear the workspace

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 144
  • Views 17725
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to delete variable or clear the workspace

imagesensor123
imagesensor123 over 13 years ago

Hi,

   could we delete some variable during the skill session, or i would like to clear my defined user workspace(mainly contain the variables) in order to save the memory. for example, i have built a form with a lot of variables, and i want to delete them after closing my window(stand window in cadence), do you have some experience to share with me. 

 

  • Cancel
  • naavika
    naavika over 13 years ago

    imagesensor123,

    Are you associating the variables with the windows? Or are they just global?

    If they are global,

    you can make them undefined by declaring them as unbound.

    If list_variable is a variable you have declared and now want to delete it,

    delete the same by declaring it as unbound.

    list_variable=`unbound;

    Hope that was helpful

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 13 years ago

    Hi naavika,

        thanks for your replying, i define some variable which is used to store some data, such as "matrix" or "form" with some fields, i try to delete them, i think they are global variables, do you mean that i can clear the memory by using the "unbound" function?  

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    SKILL will garbage collect memory when it needs to. If you have objects which are no longer referred to, these are available for garbage collection - usually before it tries to allocate any more space for a particular type of object. Note that this doesn't necessarily mean that the footprint of the virtuoso process will decrease, but it should re-use memory where it can.

    It's not necessary to set it to 'unbound for this to happen - any time the data is no longer referenced, it can be reclaimed (so setting the variable to nil would have the same effect). The difference is that setting it to unbound makes it appear as if the variable doesn't exist, so if you try to refer to the variable again later, you'll get an  "undefined variable" error message.

    Note you can force garbage collection by calling gc() (after removing references to the data of course), but it's not normally necessary to explicitly call the garbage collector yourself.

    Regards

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information