windows mem leak

Peter Hansen peter at engcorp.com
Sat Jan 8 19:20:23 CET 2005


Bob Smith wrote:
> Does the Win32 port of Python have a memory leak? I have some code that 
> runs flawlessly on Linux, but bombs after a few hours on Windows. It's 
> threaded and uses a lot of memory.

Let's see what you're missing:

1. platform specifics
2. versions of things involved
3. any sort of detail about the code
4. how you're noticing/measuring the problem
5. what "bombs" means
6. any mention that you've checked Sourceforge to see whether
    a similar problem has been reported

There have been memory leaks in various past versions of Python,
and could easily be in the current version, but they're generally
rather specific in terms of the code that can trigger it.  Once it
was doing some particular work with a socket, once it was trying to
append (or extend?) to an empty list, and so on.

There are also a few ways you could have written your application
to cause memory to leak as a result of your own code, not as a
result of Python's.  And it's even possible that this would happen
only on one platform (though I'm trying hard to think of an example
and can't... maybe it's very unlikely.)

-Peter



More information about the Python-list mailing list