Closed JustinGrote closed 3 years ago
I don't see a good way to tie the lifetime of runspaces to whether the SM module is loaded, so they are currently static. Creating runspaces for each vault call instance would not be acceptable perf wise.
But in general you should always keep track of any runspaces you create so that you can dispose of them individually when needed. You should never dispose any runspaces of unknown origin.
@PaulHigin this is purely within the scope of testing, I don't plan to do this operationally, it's just very annoying and drastically increased my inner loop is all :)
Runspaces for the secret vaults do not appear to get removed/recycled when the module is unloaded or force reloaded![image](https://user-images.githubusercontent.com/15258962/119747892-87312600-be48-11eb-9df3-c276d25c98eb.png)
This makes testing difficult because I have to manually: