Closing a Session

From Agilent VISA.NET

Closing a Session

You must use the viClose function to close each session. Closing the specific resource session frees all data structures that have been allocated for the session. If you close the default resource manager session, all sessions opened using that resource manager session will close.

Since system resources are also used when searching for resources (viFindRsrc), the viClose function needs to be called to free up find lists. See Searching for Resources for more information on closing find lists.