[IronPython] Good example of with statement usage in IronPython/COM

Sanghyeon Seo sanxiyn at gmail.com
Sat Oct 27 22:44:22 PDT 2007


2007/10/28, Shri Borde <Shri.Borde at microsoft.com>:
> There was a leak in IronPython where we were keeping COM objects alive once the IPy code manipulated the COM object. The code in the blog seems to be dealing with this bug with the use of the auto method which calls Marshal.ReleaseComObject in the finally. The bug is fixed in the 2.0 tree and so it should be possible to shorten the code a lot and end up with just a few levels of nesting.

Oops, it was a bug then.

-- 
Seo Sanghyeon


More information about the Users mailing list