[python-win32] COM Release

2005-08-15 Thread Timothy Fitz
Is there an explicit way to Release a COM object? The iTunes COM api raises an event right before it closes, and if my application doesn't release the COM object in response, iTunes will hang for 5 seconds, and then prompt the user if they want to force it to close (very ugly!) __

Re: [python-win32] COM Release

2005-08-15 Thread Mark Hammond
You need to release all Python references to any COM objects in use. Generally this can simply mean setting the object to None, thereby releasing any reference the object had. pythoncom._GetInterfaceCount() will tell you how many COM references still exist and aid you in tracking them down. Mark