Re: Python threading
- From: "Gabriel Genellina" <gagsl-py2@xxxxxxxxxxxx>
- Date: Thu, 08 Mar 2007 23:15:49 -0300
En Thu, 08 Mar 2007 14:25:02 -0300, <test.07@xxxxxxxxx> escribió:
I am wondering what happens to a thread in python in relation to
win32com extensions.
If I create a new thread, that uses the Dispatch method from win32com,
what happens to the memory allocated in that thread when the thread is
done. Will the Dispatch release the memory it created, or will the
memory remain?
The problem rises from the fact that Dispatch does not seem to release
memory correctly every time. If I include the commands in a thread by
themselves, will the thread clean up ALL memory it used after it is
done?
All threads share the same memory space, there is not a "per-thread" memory allocator, if that's what you are thinking.
Perhaps you hold a reference to some objects in the Thread object? Or you still keep the Thread object itself?
I did try the pythoncom.CoUnitialize() to release memory, but it
doesn't seem to work (it does work about 30-45 seconds after the
command is run).
I don't understand what you say here.
What means "it doesn't seem to work" and "it does work 30 seconds after"?
Any input is greatly appreciated (on the thread issue or how to use
the pythoncom.CoUnitiliaze() to make it release memory right away).
What memory do you want to release "right away"?
--
Gabriel Genellina
.
- Follow-Ups:
- Re: Python threading
- From: test . 07
- Re: Python threading
- References:
- Python threading
- From: test . 07
- Python threading
- Prev by Date: Re: Python Source Code Beautifier
- Next by Date: Re: Coding a scheduled journal application
- Previous by thread: Python threading
- Next by thread: Re: Python threading
- Index(es):
Relevant Pages
|