Python memory deallocate
bruno at modulix
onurb at xiludom.gro
Thu May 11 16:10:15 CEST 2006
mariano.difelice at gmail.com wrote:
> Ok, this is true.
> Well, you consider that my app has a first windows, where I choose, for
> example, the application 1.
> The application 1 will be started, and it will allocate 200Mb total.
> Now I want to abort this operation, and i will return to main initial
> window. The memory usage remain to 200Mb, even if I've destroyed the
> application 1 object with app1.Destroy() and del app1.
> When from initial windows i re-choose application1, the memory usage
> don't stay to 200Mb, but will increase to 360-380Mb memory, and I think
> this is not good!!!
> If I will repeat this procedure for 5-6 times, the application will
Either there are references somewhere keeping some objects alive, or
you're facing a known problem with pymalloc() . In the second case,
the good news is that this problem seems to be solved in Python 2.5 .
The bad news is that Python 2.5 is still alpha...
Just a question: do you really need your app to be monolithic ? If
you're application is really composed of many applications (which is
what I understand from your example), you should probably have many
distinct applications, one of them being in charge of running the
others. This way, 'aborting' an app would kill the corresponding
process, and free memory.
 or it's yet another problem, of course - CS wouldn't be that fun if
it was so simple :(
My 2 cents
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list