aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-03-05 23:52:38 +0100
committerSebastian Geerken <devnull@localhost>2014-03-05 23:52:38 +0100
commitc83427057a2f189cc8b237cfd35153d0f4ec6ae6 (patch)
tree1b22fa0701ed81bd7e7af343844291c22d39dde8
parent5c4a66154f8a032371b70de6322e35f792ef756e (diff)
Floats (and other OOF widgets) are now removed properly.
-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. (???) */