On 30/11/2022 9:09 am, Bob Kline wrote:

So at least part of that puzzle is cleared up, though it's still somewhat unsettling that only seven calls to ScriptItem.Close() are made, regardless of how many ScriptItem objects have been instantiated during a session.


The close method is https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.debugger.interop.iactivescript.close?view=visualstudiosdk-2019, so it's the responsibility of the host to call that. I agree it's a bit of a red flag, and may point to confusion in the host about object lifetimes, which could certainly end up causing what you are seeing. It's worth pointing out that any "obvious" bug in pywin32 here would probably be able to be reproduced in, and reported by, the various other hosts, including cscript.exe and wscript.exe (which themselves are just active script hosts, just like your problematic host)

Mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to