[wxPython-users] Re: Platform<=>version conflict or what?

Andrea Gavana andrea.gavana at gmail.com
Thu May 3 13:54:17 PDT 2007


Hi Jorma,

On 5/3/07, Jorma Paavola wrote:
> Werner F. Bruhin kirjoitti:
> > Hi Jorma,
> >
> > Jorma Paavola wrote:
> >> ...
> >>
> >> 1) Ansi build
> >> I´ll try that next ==> this means, that I have to uninstall
> >> Unicode-versions from W2k and install Ansi-version instead(because I
> >> have only one w2k-machine available!)
> >> I´ll let you know the results
> > You don't have to un-install Unicode.
> >
> > Check this page:
> > http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
> >
> > Werner
> Hi Werner,
>
> Thanks again - I noted a possibility to have both Ansi/Unicode installed !
>
> ==> Ansi and Unicode gave same Error !
>
> Based on my earlier experience with resource problems with other
> programs on Win98 - and especially after checking the size of
> memoryallocation of my TestGUI(exe)abt. 24 MB on running!! (Exe-
> Filesize is abt. 5 MB !)I am now quite convinced of that.
>
> I have one question about your "gc.function-code":
> - what/how is the meaning/use of last row: x = gc.collect() ?

What Werner did was to force Python to garbage-collect all Python
objects that do not have any reference anymore (i.e., they are useless
and can be safely destroyed/removed to increase the resource
availability).
Quoting Fredrik Lundh very useful help pages:

"""
Python uses reference counting to keep track of when to get rid of
objects; as soon as the last reference to an object goes away, the
object is destroyed.

Starting with version 2.0, Python also provides a cyclic garbage
collector, which runs at regular intervals. This collector looks for
data structures that point to themselves, and does what it can to
break the cycles.

You can use the gc.collect function to force full collection. This
function returns the number of objects destroyed by the collector.
"""

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/




More information about the wxpython-users mailing list