Memory leak when creating lots of object

Paul Moore p.f.moore at
Sat Aug 18 18:48:29 CEST 2007

On 17 Aug, 04:51, Godzilla <godzillais... at> wrote:
> On Aug 16, 1:13 am, Paul  Moore< at> wrote:
> > On 14 Aug, 05:57, Godzilla <godzillais... at> 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...


More information about the Python-list mailing list