I'm having difficulty figuring out just why the declaration of FigureCanvasTkAgg causes a memory leak, I have the following lines in my class __init__
method:
# pndwinBottom is a paned window of the main screen
self.__drawplotFrame = Frame(pndwinBottom, width=WIDTH, height=HEIGHT) # the frame on which we will add our canvas for drawing etc.
self.__fig = plt.figure(figsize=(16,11))
self.__drawplotCanvas = FigureCanvasTkAgg(self.__fig, master=self.__drawplotFrame)
the problem is that upon running my application , and exiting, python32.exe remains in my process window and will clog up my computer. Commenting out these three lines however will allow my application to exit and the process will correctly terminate. What could these lines be doing to my application that prevents the process from ending after the application is finished? Thanks
edit
The memory leak seems to be caused by only the line self.__fig = plt.figure(figsize=(16, 11))
. Do I need to do some sort of deconstruction with plt before exiting?