unused frames remaining in memory

Hello All,
First of all thanks to everyone on this list, over the past few weeks I have
learned a lot from you.

This is a problem I have been dealing with for a little while, and cant seem to
figure out. I am writing a GUI to display data from a series of tests(5-500
tests). I need to display plots created using pylab, pictures, and some text
data in one panel per test. I would like to be able to "sideshow" through the
panels/tests, to see how things change over time. Actually building the panels
takes awhile computationally, so I have been making them ahead of time, then
adding and removing them from a dictionary with a time delay. This works really
well for <30 tests at a time. After that I get up into very high memory usage,
and things start going poorly. My plan was to do all the data analysis to a
certain number of tests at a time, and keep all the rest in a shelve file,
keeping memory usage down. This worked great. I then wanted to do the same
with the panels, open 20 tests from the shelve file, make panels, play them,
then save the tests back, and open up another 20 and continue.

This works fine too, except when I try to delete the panels they do not clear
out of my memory. I am sure to delete all references to them I could find, but
they will not go away. I think it might be because they are a child to my main
frame, and that could be the reference, but I don't know how to check that.

Any suggestions on how to do this better would be very much appreciated, I am
not a programmer, and I am sure I am not doing this the way it should be done.

Thanks,

Scott

Scott wrote:

Hello All, First of all thanks to everyone on this list, over the past few weeks I have
learned a lot from you.

This is a problem I have been dealing with for a little while, and cant seem to
figure out. I am writing a GUI to display data from a series of tests(5-500
tests). I need to display plots created using pylab, pictures, and some text
data in one panel per test. I would like to be able to "sideshow" through the
panels/tests, to see how things change over time. Actually building the panels
takes awhile computationally, so I have been making them ahead of time, then
adding and removing them from a dictionary with a time delay. This works really
well for <30 tests at a time. After that I get up into very high memory usage,
and things start going poorly. My plan was to do all the data analysis to a
certain number of tests at a time, and keep all the rest in a shelve file,
keeping memory usage down. This worked great. I then wanted to do the same
with the panels, open 20 tests from the shelve file, make panels, play them,
then save the tests back, and open up another 20 and continue.

This works fine too, except when I try to delete the panels they do not clear
out of my memory. I am sure to delete all references to them I could find, but
they will not go away. I think it might be because they are a child to my main
frame, and that could be the reference, but I don't know how to check that.

The C++ object for the child windows is owned by the parent window, and each window also holds a reference to the Python proxy object for the window. Normally a child window is destroyed by its parent when the parent is destroyed. If you want to destroy a child window before that time then call its Destroy method.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!