summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-26 12:00:00 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-26 12:00:00 (GMT)
commit6b41ee3cff858ded8d6af891e7725211ea0aba98 (patch)
tree0ca9a91f90a1f9724af816d7de4f7836198bb9c3 /generic
parente86c3d4ae2c1259394d504b374abeeba918d8e25 (diff)
downloadblt-6b41ee3cff858ded8d6af891e7725211ea0aba98.zip
blt-6b41ee3cff858ded8d6af891e7725211ea0aba98.tar.gz
blt-6b41ee3cff858ded8d6af891e7725211ea0aba98.tar.bz2
Correct memory leak
A future improvement would be to cache the calculated layout information together with of the strings. Examples where this would be beneficial could be the axes tick labels or the legend labels.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkbltGrText.C1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tkbltGrText.C b/generic/tkbltGrText.C
index b5c3671..0b4e3e3 100644
--- a/generic/tkbltGrText.C
+++ b/generic/tkbltGrText.C
@@ -109,6 +109,7 @@ void TextStyle::drawTextBBox(Drawable drawable, const char *text,
Tk_DrawTextLayout(graphPtr_->display_, drawable, gc_, layout,
(int)rr.x, (int)rr.y, 0, -1);
#endif
+ Tk_FreeTextLayout(layout);
if (ww && hh) {
double angle = fmod(ops->angle, 360.0);