Opened 13 years ago

Closed 13 years ago

Last modified 12 months ago

#2677 closed defect (invalid)

ListWidget leaks _scrollBar

Reported by: SF/madm00se Owned by: sev-
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

ListWidget's constructor creates a new ScrollBarWidget
but it's never deleted again.

Ticket imported from: #1506182. Ticket imported from: bugs/2677.

Attachments (1)

listwidget-leak.diff (273 bytes ) - added by SF/madm00se 13 years ago.
Leak patch

Download all attachments as: .zip

Change History (5)

by SF/madm00se, 13 years ago

Attachment: listwidget-leak.diff added

Leak patch

comment:1 by sev-, 13 years ago

Owner: set to sev-
Resolution: invalid
Status: newclosed

comment:2 by sev-, 13 years ago

All dialogs create new widget but seemingly never delete them.

In fact they do. Take a look at Widget destructor. It will
call delete on next widget in widgets chain which
effectively destroys all children.

Only problem which could be with our GUI code is when widget
is recreated on each resolution change, and particularly
ListWidget had this bug. It used to add yet another
scrollbar on each resolution change.

comment:3 by SF/madm00se, 13 years ago

Hmm, strange. MallocDebug was definitely showing a leak but,
of course, I can't reproduce it now.

Either way, as you rightly state, my patch was wrong.

comment:4 by digitall, 12 months ago

Component: GUI
Note: See TracTickets for help on using tickets.