Bugs item #753154, was opened at 2003-06-12 19:34
Message generated for change (Comment added) made by mhammond
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=753154&group_id=78018
Category: com
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Andrea Babini (ababini)
Assigned to: Nobody/Anonymous (nobody)
Summary: memory leak wrapping object having _typelib_guid_ attribute
Initial Comment:
Problem experimented using win32all build 152, Python
2.2.2.
The attached .zip file contains:
A) TestServer.tlb that defines the IPippo interface
B) CPippo.py that implements IPippo referring the typelib
using _com_interfaces and _typelib_guid_ attributes
C) PyPippo.py that implements IPippo using
_public_method_ attribute
D) CTest.py that reproduce the problem using CPippo
E) PyTest.py that is the same as CTest.py but use
PyPippo and doesn't have the leak
F) universal.py as modified by me to reduce the size of
the leak. My changes are only a workaround to reduce
the leak in my specific use (only one interface for
object, no lcid and typelib version support). Moreover I
think that with this change the performances are
improved as well.
The steps to reproduce the problem are:
1. COM registrations
1.1 python regtlb.py TestServer.tlb
1.2 python CPippo.py
1.3 python CTest.py
2. Test to highlight the leak (it use CPippo class)
2.1 python CTest.py
----------------------------------------------------------------------
>Comment By: Mark Hammond (mhammond)
Date: 2004-04-22 18:24
Message:
Logged In: YES
user_id=14198
I meant to mention - I added "pippo" to the standard test
suite, including the IDL etc. It currently doesn't do much
beyond a simple leak test, but is a great framework for
further tests - thanks!
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2004-04-22 17:49
Message:
Logged In: YES
user_id=14198
Thanks! I found the underlying memory leaks, and fixed them.
Your sample no longer leaks at all, even though I didn't
implement the cache in your patch. Note that by using
gencache.EnsureModule(), you get the same benefits of the
cache (and not even take the hit each time the process
starts 0 just once as a .py is generated)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=753154&group_id=78018
|