[Python] Garbage collection and OS

2008-04-11 Per discussione raffaello
 Is it true that when an object is destroyed in a Python application
the garbage collector does NOT give back the occupied memory to the
Operating System as long as the application is running, but keeps it at the
disposal of the same application?
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Garbage collection and OS

2008-04-11 Per discussione raffaello
Scusami, Enrico, hai ragione.
Cercherò di spiegarmi meglio dicendo cosa voglio ottenere.
Scrivo dei programmi in wx.Python basati su una frame principale e su
numerose frame secondarie destinate a operazioni usate raramente.
Se la memoria usata da queste finestre secondarie NON viene restituita
all'OS alla distruzione dell'oggetto, ma è trattenuta a disposizione del
programma, tanto vale nascondere e mostrare le frame senza ripetere ogni
volta il lavoro di inizializzazione.

2008/4/11, enrico franchi <[EMAIL PROTECTED]>:
>
> On Fri, Apr 11, 2008 at 4:38 PM, raffaello <[EMAIL PROTECTED]>
> wrote:
>
> >  Is it true that when an object is destroyed in a Python application
> > the garbage collector does NOT give back the occupied memory to the
> > Operating System as long as the application is running, but keeps it at
> the
> > disposal of the same application?
>
>
> 1. Since this is an italian mailing list, Italian or Python should be
> preferred (writing prose in Python is quite hard, though).
> 2. It is not true that the behaviour you described is part of
> *Python*. However, as far as I know this was (and may be as well) the
> behaviour of the interpreter. This is a reasonable behaviour.
>
>
>
> --
> -enrico
> ___
> Python mailing list
> Python@lists.python.it
> http://lists.python.it/mailman/listinfo/python
>
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Garbage collection and OS

2008-04-14 Per discussione raffaello
Ho fatto la prova con un programma dotato di molte finestre. Aprendole e
chiudendole, e controllando l'utilizzo memoria in task manager, la memoria
viene effettivamente restituita, ma solo al 70% circa.
Comunque grazie dell'aiuto.

2008/4/14, enrico franchi <[EMAIL PROTECTED]>:
>
> On Sat, Apr 12, 2008 at 8:47 AM, Nicola Larosa <[EMAIL PROTECTED]> wrote:
>
> >  Era vero fino alla versione 2.4 dell'interprete; dalla 2.5 la memoria
> non
> >  più usata viene effettivamente restituita al sistema operativo.
>
> Bene. TY.
>
>
>
> --
>
> -enrico
>
> ___
> Python mailing list
> Python@lists.python.it
> http://lists.python.it/mailman/listinfo/python
>
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python