Hi.

Sorry but that program does not even run. I am using

matplotlib-1.0.1.win32-py2.6.exe

It breaks with the error (I had to modified a little to get the full error):

UnboundLocalError: local variable 'mem' referenced before assignment
Traceback (most recent call last):
File...
File "C:\Python26\lib\site-packages\matplotlib\cbook.py", line 1245, in 
report_memory
    return mem

Looks like you are using a different matplotlib version.

Cheers


--- On Wed, 6/15/11, Eric Firing <efir...@hawaii.edu> wrote:

From: Eric Firing <efir...@hawaii.edu>
Subject: Re: [Matplotlib-users] canvas.draw() + pyqt4 memory leak
To: matplotlib-users@lists.sourceforge.net
Date: Wednesday, June 15, 2011, 7:46 PM

On 06/15/2011 01:15 PM, zb wrote:
> Hi
>
> You could try the example here:
>
> http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.html
>
> Look at the memory grow. It does the same in my program.

I added a call to cbook.report_memory, and shortened the timer to 0.1 
seconds in the attached version.

There is no memory leakage evident when I run this on my system.

Eric

>
> Cheers
>
> --- On *Wed, 6/15/11, Eric Firing /<efir...@hawaii.edu>/* wrote:
>
>
>     From: Eric Firing <efir...@hawaii.edu>
>     Subject: Re: [Matplotlib-users] canvas.draw() + pyqt4 memory leak
>     To: matplotlib-users@lists.sourceforge.net
>     Date: Wednesday, June 15, 2011, 6:33 PM
>
>     On 06/15/2011 12:13 PM, zb wrote:
>      > Hi
>      >
>      > I have a loop that updates a graph by calling
>      >
>      > self.fig.canvas.draw()
>      >
>      > But every time it updates the graph, the memory usage goes up. If the
>      > program runs for one hour, the memory is gone (things start to
>     run slow
>      > too). I've tried to close() objects but the only thing that
>     brings back
>      > the ram memory is to close the whole application.
>      >
>      > I have read this note in the documentation (but it applies to
>     pyplot):
>      >
>      > "If you are making a long sequence of figures, you need to be
>     aware of
>      > one more thing: the memory requiredfor a figure is not completely
>      > released until the figure is explicitly closed with close(). Deleting
>      > all references to the figure, and/or using the window manager to kill
>      > the window in which the figure appears on the screen, is not enough,
>      > because pyplot maintains internal references until close() is
>     called."
>      >
>      > What could I do in pyqt4 to release the memory?
>      >
>      > Thanks
>
>     Please provide a simple standalone script that demonstrates the problem.
>
>     Eric
>

-----Inline Attachment Follows-----

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
-----Inline Attachment Follows-----

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to