[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Does Python cache the startup module?

Baz Walter

1/7/2008 9:17:00 PM

Fredrik Lundh <fredrik <at> pythonware.com> writes:
> So what you're concerned about is the lack of cleanup during interpreter
> shutdown, not a true leak (which would result in "Max widgets" growing
> towards infinity).

Yes, sorry about my sloppy terminology.

> The problem here is that you're relying on Python's GC to remove things
> in a given order during shutdown, something that may or may not happen
> depending on lots of things that you cannot control:
>
> http://www.python.org/doc/essay...
>
> (Note the repeated use of "In an order determined by the dictionary
> hashing of the names" in that article.)
>
> The only way to get *predictable* shutdown behaviour in situations like
> this is to clean things up yourself. But in this case, you might as
> well leave the cleanup to the OS.

I think you've found the real cause. I changed the name from 'mainwidget'
to 'aaa' and the problem went away. I will have to investigate whether there is
anything I can do from the Qt side to make sure things get cleaned up more
predictably.

Many Thanks




1 Answer

WolfyRik

3/20/2008 4:42:00 PM

0

On Mar 20, 4:34 pm, Anonology <shroomiga...@yahoo.com> wrote:
> I would love to have seen her reaction when she found that sticker :)

Sneaky Anon, good work! I want some of those stickers! *goes green
with envy*