According to the documentation for Panel::die [1], destroy (which calls die) is 
the correct implementation and directly deleting the window is probably wrong - 
I think it leaks the children. 

The problem with die() is that it only deletes on the next frame. And I'd say 
that is where the bug is: In [2], the registry checks if (window) { 
window->die(); }, but it should also immediately after do 'window = nullptr', 
since it sorta gave up ownership by telling the window to kill itself. that 
should fix the bug too.


[1]: 
http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/8199/src/ui_basic/panel.cc#L655
[2] 
http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/8199/src/ui_basic/unique_window.cc#L45


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1644553-buildhelp-button/+merge/312429
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1644553-buildhelp-button into lp:widelands.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to