Bug #1791
closedSegfault on deleting WPopupMenu in a widget destructor
0%
Description
Hey,
I'm using the WPopupMenu exactly as in Treeview example shown and get segmentation fault when I try to delete a widget using its popup menu (see attachment: Widget.cpp line 144). With earlier wt versions this was ok (the last wt where I saw it works was 3.2.1). When I call the destructor (Widget.cpp line 144) and try to delete the popup in it, it seems that the popup is already deleted. If I do not delete the popup in the destructor it would be a memory leak, moreover, a segmentation fault occur on application destructor call.
I tried to use a boost::scoped_ptr (actually it was my original intention, in order not to forget to delete the popup in the destructor and was ok with wt-3.2.1) instead of a "simple" pointer, but with any success.
Regards,
Stoycho
s.: tested with Wt-3.3.0RC4
Files
Updated by Koen Deforche over 11 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
Updated by Koen Deforche over 11 years ago
- Status changed from InProgress to Resolved
Hey,
Thanks for the updated test case. I've fixed this in latest git.
Regards,
koen
Updated by Стойчо Стефанов Stoycho Stefanov over 11 years ago
Hey,
thanks for the fix. Now it's good.
regards,
stoycho
Updated by Koen Deforche over 11 years ago
- Status changed from Resolved to Closed