[Python-Dev] New winreg module really an improvement?

Gordon McMillan gmcm@hypernet.com
Mon, 7 Aug 2000 08:00:10 -0400


Paul Prescod wrote:

> Gordon McMillan wrote:
> > 
> > ...
> > 
> > As a practical matter, it looks to me like winreg (under any
> > but the most well-informed usage) may well leak handles. If so,
> > that would be a disaster. But I don't have time to check it
> > out.
> 
> I would be very surprised if that was the case. Perhaps you can
> outline your thinking so that *I* can check it out.

Well, I saw RegKey.close nowhere referenced. I saw the 
method it calls in _winreg not getting triggered elsewhere. I 
missed that _winreg closes them another way on dealloc.

BTW, not all your hive names exist on every Windows 
platform (or build of _winreg).
 


- Gordon