Project

General

Profile

Actions

Bug #13019

open

Ensure that remove is consistently called

Added by Matthias Van Ceulebroeck 5 months ago. Updated 6 days ago.

Status:
Review
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 3 months ago

  • Target version changed from 4.11.1 to 4.11.2
Actions #2

Updated by Romain Mardulyn 7 days ago

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn
Actions #3

Updated by Romain Mardulyn 6 days ago

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)
  • Target version changed from 4.11.2 to 4.11.3
Actions

Also available in: Atom PDF