[python-win32] Releasing a Com object

Gary Scorby Gary.Scorby at harlandfs.com
Tue Jan 20 20:13:10 CET 2009


You are correct, it no longer refers to the object.  I should have added
a few more details.  Windows still believes the object is in use, in
this case it's a dll.  Nothing else can be done with the dll until
Python is completely shut down.  None of the other dll com objects I
have used in the past have had this problem.

 

Thanks

 

Gary

 

From: bob gailer [mailto:bgailer at gmail.com] 
Sent: Tuesday, January 20, 2009 11:05 AM
To: Gary Scorby
Cc: python-win32 at python.org
Subject: Re: [python-win32] Releasing a Com object

 

Gary Scorby wrote: 

I'm having trouble releasing a com object.  In the past I've always set
the instance to None and life is good, as in the example below.  I'm
currently working with an object I can't release with this method.
Anybody have a different/better way to handle this?


"can't release" - what does that mean? Certainly xxx no longer refers to
the object.



 

Thanks

 

Gary

 

# example

xxx = win32com.client.Dispatch('abcd.XXX')

# to release

xxx = None

 

-- 
Bob Gailer
Chapel Hill NC
919-636-4239

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090120/85055621/attachment-0001.htm>


More information about the python-win32 mailing list