do anonymous pipes normally work on NT?

Mark Hammond MHammond at skippinet.com.au
Mon Jun 14 00:10:31 CEST 1999


Georg Mischler wrote in message <7k07tu$veb$1 at nnrp1.deja.com>...

>> Second advantage is that you deal with > "PyHANDLE" objects,
>> and explicit closing is not necessary (a-la files)
>
>I seem to remember a post by someone (you?) who stated
>that *not* closing Windows handles on could lead to serious
>resource leaks. Am I confusing something here or are
>not all handles created equal?

Well, not all handles are created equal anyway, but the point I was making
that PyHANDLE object automatically close the handle when it dies - like a
file object.  So the handles will be closed even if you do not explicitely
close them.

My comment wasnt intended to throw light on the specific problem - just
point out an advantage that PyHANDLE objects have.  OTOH, I am wildly
guessing that using CreateFile could solve the problem - not due to the
"auto-close" behaviour, but simply because they remove the indirection.  I
have no basis for believing it will solve the problem, just a guess!

Mark.







More information about the Python-list mailing list