Possible memory leak?

Steven D'Aprano steve at REMOVEMEcyber.com.au
Wed Jan 25 02:36:26 EST 2006


Tuvas wrote:

> Oh, I should also mention, I used a memory monitor and saw the amount
> of memory being used go up with time, even when the function ended,
> meaning I did the 10 128x128 pictures, never was any memory dealocated
> until I exited the program.

Are you really trying to say that the amount of memory 
being used is going up even when the function is not 
being used?

If so, then at least part of your problem exists in 
another part of your program.

If you are monitoring the amount of memory being 
allocated to Python, then no, Python won't generally 
return memory to the operating system while it is still 
running. But the memory allocated to your data 
structures will be reclaimed by Python when they are 
not in use.


-- 
Steven.




More information about the Python-list mailing list