From: Michiel de H. <mjl...@ya...> - 2009-11-08 05:13:27
|
Hi everybody, I was looking at this bug about a memory leak: https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2889570&group_id=80706 While this bug is now essentially fixed, I noticed that the Figure class contains some circular references that prevent it from being cleaned up by the garbage collector, which is effectively a memory leak. At least, for this code: >>> from matplotlib.figure import Figure >>> fig = Figure() >>> del fig the garbage collector reports 76 unreachable objects. This seems to be independent of which backend is being used. Is it worthwhile to look deeper into it? Or should we accept that it is unavoidable that a library of the size of matplotlib will have circular references? --Michiel. |