Small mem leak in GUI mk1 (0.300)

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
DreadID4
Just popping in
Just popping in
Posts: 5
Joined: Wed Jan 12, 2005 12:06
Contact:

Small mem leak in GUI mk1 (0.300)

Postby DreadID4 » Tue Mar 16, 2004 23:31

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Small mem leak in GUI mk1 (0.300)

Postby CrazyEddie » Wed Mar 17, 2004 09:12

Thanks. That one must have slipped by me! ;)

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Small mem leak in GUI mk1 (0.300)

Postby CrazyEddie » Wed Mar 17, 2004 10:31

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!

User avatar
DreadID4
Just popping in
Just popping in
Posts: 5
Joined: Wed Jan 12, 2005 12:06
Contact:

Small mem leak in GUI mk1 (0.300)

Postby DreadID4 » Thu Mar 18, 2004 05:41

Thanks for the compliments crazy ed! Of course, I couldn't have done it w/ out the GUI system. :wink:


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest