Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55904d2

Browse files
committed
Merged revisions 8839 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v1_0_maint ........ r8839 | mdboom | 2010-12-14 12:30:12 -0500 (Tue, 14 Dec 2010) | 2 lines Fix memory leak in text layout handling. ........ svn path=/trunk/matplotlib/; revision=8840
1 parent 400328b commit 55904d2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/text.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ class Text(Artist):
143143
Handle storing and drawing of text in window or data coordinates.
144144
"""
145145
zorder = 3
146+
147+
cached = maxdict(50)
148+
146149
def __str__(self):
147150
return "Text(%g,%g,%s)"%(self._y,self._y,repr(self._text))
148151

@@ -168,7 +171,6 @@ def __init__(self,
168171
"""
169172

170173
Artist.__init__(self)
171-
self.cached = maxdict(5)
172174
self._x, self._y = x, y
173175

174176
if color is None: color = rcParams['text.color']

0 commit comments

Comments
 (0)