From 1ba3755aa7383c34042f781c85a28f76417962cd Mon Sep 17 00:00:00 2001 From: alberth Date: Wed, 3 Jun 2009 20:00:33 +0000 Subject: (svn r16513) -Codechange: Add nested widgets root and array to Window, and NWidgetBase::FillNestedArray() to fill the array. --- src/window.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 5fbaac72e..d2a493fe2 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -563,6 +563,8 @@ Window::~Window() this->SetDirty(); free(this->widget); + free(this->nested_array); // Contents is released through deletion of #nested_root. + delete this->nested_root; this->window_class = WC_INVALID; } @@ -789,6 +791,8 @@ static void AssignWidgetToWindow(Window *w, const Widget *widget) void Window::Initialize(int x, int y, int min_width, int min_height, WindowClass cls, const Widget *widget, int window_number) { + /* All data members of nested widgets have been set to 0 by the #ZeroedMemoryAllocator base class. */ + /* Set up window properties */ this->window_class = cls; this->flags4 = WF_WHITE_BORDER_MASK; // just opened windows have a white border -- cgit v1.2.3-54-g00ecf