changeset 973:4355018cc2af

Fixed a minor memory leak with CustShrinkTabPager()
author Hofmann Johannes <Johannes.Hofmann@gmx.de>
date Mon, 02 Mar 2009 14:31:23 -0300
parents d7dbd3dcfa38
children cfd5d7845bf3 d14bddcad83d
files src/uicmd.cc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/uicmd.cc	Mon Mar 02 12:32:20 2009 -0300
+++ b/src/uicmd.cc	Mon Mar 02 14:31:23 2009 -0300
@@ -225,7 +225,10 @@
 public:
    CustTabGroup (int x, int y, int ww, int wh, const char *lbl=0) :
       TabGroup(x,y,ww,wh,lbl) {
-         this->pager(new CustShrinkTabPager());
+         // The parameter pager is cloned, so free it.
+         CustShrinkTabPager *cp = new CustShrinkTabPager();
+         this->pager(cp);
+         delete cp;
          toolTip = new Tooltip;
          tooltipEnabled = false;
          buttonPushed = false;