Memory leak when creating lots of object

Paul Moore p.f.moore at gmail.com
Sat Aug 18 12:48:29 EDT 2007


On 17 Aug, 04:51, Godzilla <godzillais... at gmail.com> wrote:
> On Aug 16, 1:13 am, Paul  Moore<p.f.mo... at gmail.com> wrote:
> > On 14 Aug, 05:57, Godzilla <godzillais... at gmail.com> wrote:
> > Do you see memory growth with precisely this code? Over what period?
> > How much?
>
> I have it running for more than 1 hour... the main application
> software runs for about 50 days non stops and the memory just keep
> growing...

I'm sorry. Just to be precise, how long would I need to run the code
you posted to see a memory growth?

> What should I do next? Can I force garbage collection manually? If so,
> how do I do that?

As Terry suggested, look at the gc module (gc.collect). But on
inspection, I don't see a memory leak that would be cured by forcing a
collection, which is why I'd like to reproduce the problem before
offering suggestions...

Paul.




More information about the Python-list mailing list