[Python-bugs-list] [ python-Bugs-459160 ] Py closes COM instances not loaded by Py
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 06 Sep 2001 23:07:59 -0700
Bugs item #459160, was opened at 2001-09-06 06:39
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=459160&group_id=5470
Category: Windows
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Mark Hammond (mhammond)
Summary: Py closes COM instances not loaded by Py
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-09-06 23:07
Message:
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).
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=459160&group_id=5470