Project

General

Profile

Actions

Bug #13019

open

Ensure that remove is consistently called

Added by Matthias Van Ceulebroeck 2 months ago. Updated 12 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
09/05/2024
Due date:
% Done:

0%

Estimated time:

Description

When a widget is removed from the tree, the destructor will be executed on the C++ side of Wt.
As the Java alternative, the remove() method is used. This can the per widget decide on the way the widget should behave when being "destructed", like cleaning up state or data.

There is however a case (or more cases?) where this isn't called. This happens when WTemplate::clear() is called on all its widgets. Those widgets are removed from the view, but not properly destructed using remove().
It seems this does correctly happen in WContainerWidget::clear().

This seemingly may be as easy as calling removeWidget(), but needs to be verified.

Actions #1

Updated by Matthias Van Ceulebroeck 12 days ago

  • Target version changed from 4.11.1 to 4.11.2
Actions

Also available in: Atom PDF