This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Py closes COM instances not loaded by Py
Type: Stage:
Components: Windows Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: mhammond Nosy List: mhammond, tim.peters
Priority: normal Keywords:

Created on 2001-09-06 13:39 by anonymous, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg6412 - (view) Author: Nobody/Anonymous (nobody) Date: 2001-09-06 13:39
I have a script using win32com. An instance of a COM 
object is loaded. As part of the load, the server 
loads an instance of another com object. The server 
has a get property returning the IDisp of the server 
loaded object. In a def, the get property is used 
thus:- ocp.Msg1001.Data where, ocp is the Python loaded
ocject and Msg1001 is the serverloaded object. As soon 
as the def ends, Python garbage collects ocp.Msg1001 
rendering it unusable. If I create a variable in 
__main of ocp.Msg1001, all is well.

The problem is caused by the fact that Python cannot 
tell between a com instance it created and one it has 
been passed. 
msg6413 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-09-07 06:07
Logged In: YES 
user_id=31435

Reassigned to Mark.  Anonymous, you should really report 
this to ActiveState instead (the SourceForge Python project 
doesn't supply the Win32 extensions).
msg6414 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2002-04-18 02:19
Logged In: YES 
user_id=14198

I am afraid I can't understand this.  What I do understand 
seems to be working correctly.  There is no email address 
where I can get further information.

Anonymous - please either add a bug in the ActivePython bug 
database (please include sample code) or mail me directly.
History
Date User Action Args
2022-04-10 16:04:25adminsetgithub: 35126
2001-09-06 13:39:24anonymouscreate