#2677 closed defect (invalid)
ListWidget leaks _scrollBar
Reported by: | SF/madm00se | Owned by: | sev- |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | 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)
Change History (5)
by , 18 years ago
Attachment: | listwidget-leak.diff added |
---|
comment:1 by , 18 years ago
Owner: | set to |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 by , 18 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 , 18 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 , 6 years ago
Component: | → GUI |
---|
Leak patch