[IronPython] Good example of with statement usage in IronPython/COM
Shri.Borde at microsoft.com
Sun Oct 28 06:50:18 CET 2007
Well, still a good use of "with" for an elegant workaround :)
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Saturday, October 27, 2007 10:44 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Good example of with statement usage in IronPython/COM
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.
Users mailing list
Users at lists.ironpython.com
More information about the Ironpython-users