aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/outofflowmgr.cc2
-rw-r--r--dw/textblock.cc9
2 files changed, 10 insertions, 1 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc
index 8df844a1..f3a89ef2 100644
--- a/dw/outofflowmgr.cc
+++ b/dw/outofflowmgr.cc
@@ -498,6 +498,8 @@ OutOfFlowMgr::~OutOfFlowMgr ()
delete rightFloatsAll;
delete absolutelyPositioned;
+
+ DBG_OBJ_DELETE ();
}
void OutOfFlowMgr::sizeAllocateStart (Allocation *containingBlockAllocation)
diff --git a/dw/textblock.cc b/dw/textblock.cc
index fd60f616..ece23491 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -315,8 +315,15 @@ Textblock::~Textblock ()
delete words;
delete anchors;
- if(outOfFlowMgr)
+ if(outOfFlowMgr) {
+ // I feel more comfortable by letting the textblock delete these
+ // widgets, instead of doing this in ~OutOfFlowMgr.
+
+ for (int i = 0; i < outOfFlowMgr->getNumWidgets (); i++)
+ delete outOfFlowMgr->getWidget (i);
+
delete outOfFlowMgr;
+ }
/* Make sure we don't own widgets anymore. Necessary before call of
parent class destructor. (???) */