Page 1 of 1

Small mem leak in GUI mk1 (0.300)

Posted: Tue Mar 16, 2004 23:31
by DreadID4
Here's a trivial memory leak I found in MultiColumnListWidget.cpp:

Code: Select all

/*************************************************************************
   Destructor
*************************************************************************/
MultiColumnListWidget::~MultiColumnListWidget(void)
{
   removeChildWindow(*d_header);
   removeChildWindow(*d_horzScroller);
   removeChildWindow(*d_vertScroller);

   delete d_header;
   delete d_horzScroller;
   delete d_vertScroller;

   delete d_sortColumnChangedCommand;
   delete d_headerSizedCommand;
}


Should be:

Code: Select all

/*************************************************************************
   Destructor
*************************************************************************/
MultiColumnListWidget::~MultiColumnListWidget(void)
{
   removeChildWindow(*d_header);
   removeChildWindow(*d_horzScroller);
   removeChildWindow(*d_vertScroller);

   delete d_header;
   delete d_horzScroller;
   delete d_vertScroller;

   delete d_sortColumnChangedCommand;
   delete d_headerSizedCommand;
   delete d_headerDblClickCommand; // *** added this
}


I just added the last delete, which is "delete d_headerDblClickCommand;".

I checked CVS to make sure that it was there as well, and it is there as well. Thanks again for the GUI system.

Small mem leak in GUI mk1 (0.300)

Posted: Wed Mar 17, 2004 09:12
by CrazyEddie
Thanks. That one must have slipped by me! ;)

I'll get the fix into the CVS later today.

Small mem leak in GUI mk1 (0.300)

Posted: Wed Mar 17, 2004 10:31
by CrazyEddie
Fix is now in CVS.

Btw: I checked out "iauns" - you've done a lot of work since last I saw the project :D

Excellent stuff!

Small mem leak in GUI mk1 (0.300)

Posted: Thu Mar 18, 2004 05:41
by DreadID4
Thanks for the compliments crazy ed! Of course, I couldn't have done it w/ out the GUI system. :wink: