You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1class="Heading-1"><fontcolor="#0000A0">Deleting an Object</font></h1>
</div>
<div>
<pclass="Normal"> To hide a VPython object just make it invisible: <spanclass="attribute">ball.visible
= False</span>. This does not delete the object from computer memory, and you can make it visible again later.</p>
<pclass="Normal">If however you later re-use the name <spanclass="attribute">ball</span>,
for example by creating a new object and naming it <spanclass="attribute">ball</span>,
Python will be free to release the memory used by the object formerly named <spanclass="attribute">ball</span> (assuming no other names currently refer
to that object). If the object is visible when you re-use the name <spanclass="attribute">ball</span>, the original object will not be deleted from computer memory, and it will remain visible in the window.</p>
<pclass="Normal">After you make an object named ball invisible, you can delete it immediately with <spanclass="attribute">del ball</span>.</p>