Hi evebrybody,
 
I started a discussion one week ago about a problem of memory leak using the following code:
 
********************************************************************************
from Tkinter import *
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import pylab
 
def display():
mat = pylab.zeros((100,100))
pylab.ioff()
image = pylab.matshow(mat)
pylab.ion()
pylab.close()
can = FigureCanvasTkAgg(image, master=frame)
can.show()
can.get_tk_widget().grid(row = 0,column = 0)
 
root = Tk()
frame = Frame(root)
frame.grid(row = 0,column = 0)
canvas = Canvas(frame, width = 240, height = 240, relief = "sunken", bg = "white")
canvas.grid()
button = Button(root,text="DisplayMatrix",command = display)
button.grid(row = 1,column = 0)
*******************************************************************************
 
up to now, I have not found any way to solve it and unfortunately the proposed hints did not solve the problem (gc_collect(), clf(), cla()). Is there something new about this ?
 
thanks
 
Eric


Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.