Python memory deallocate
Diez B. Roggisch
deets at nospam.web.de
Thu May 11 17:25:52 CEST 2006
> In python 2.5 this was resolved, ok, but i can't use any python version
> then 2.3.5.
> This project was initializated with this version, and now it can be
> dangerous change version, even because I use McMillan installer for
> compile e build an executable.
> So, my initial window is a "menu window", when i can choose, for
> example, upload foto for print, or create an object as PhotoAlbum.
> If i'will choose PhotoAlbum, it will allocate 200Mb. well! if i decide
> to abort this work, i will return to initial window. and if i will
> click in PhotoAlbum ago, the memory will increase to 350-400Mb.
> It's that!!! I don't understand why!!! when i abort the work the first
> time, i call
> del app
> Why Python ( or GarbageCollector, or.... ) don't deallocate memory??
> If it's not possibile, why python don't reuse the memory "cached"?
Because you might have kept references somewhere. And nobody knows where
without you showing code.
Lots of long-running memory intensive apps such as ZODB are written in
python - so I doubt that it is a problem of python itself, but instead of
your program. Try and reproduce the behavior with a self-contained script -
if that still exposes the problem we can look at it maybe fixpython if
Besides: _if_ it was a python error, you'd have to move to a knew python
version anyway, won't you? And just because you McMillan Installer won't
work doesn't mean that YOU can't try python2.4 or even 2.5, and see if it
More information about the Python-list