How to free memory ( ie garbage collect) at run time with Python 2.5.1(windows)

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Aug 28 04:24:00 EDT 2007


Alex Martelli a écrit :
> rfv-370 <robert.vergnes at yahoo.fr> wrote:
(snip)
>> So how can I force Python to clean the memory and free the memory that
>> is not used?
> 
> On Windows, with Python 2.5, I don't know of a good approach (on Linux
> and other Unix-like systems I've used a strategy based on forking, doing
> the bit that needs a bazillion ints in the child process, ending the
> child process; but that wouldn't work on Win -- no fork).

IIRC, Windows has it's own way to let you launch other processes, so a 
similar strategy might apply here...




More information about the Python-list mailing list