diff --git a/src/kekengine/cpp/ui/uielements.cpp b/src/kekengine/cpp/ui/uielements.cpp index df06f92..08fbdc5 100644 --- a/src/kekengine/cpp/ui/uielements.cpp +++ b/src/kekengine/cpp/ui/uielements.cpp @@ -349,6 +349,11 @@ UIWindowTitleBar::UIWindowTitleBar(UIValue height) addChild(closeButton); } +UIWindowTitleBar::~UIWindowTitleBar() { + delete text; + delete closeButton; +} + void UIWindowTitleBar::dragEnter(UIPoint pos, UIPoint screenPos) { // TODO } @@ -380,6 +385,8 @@ UIWindow::UIWindow(UIValue x, UIValue y, UIValue w, UIValue h) } UIWindow::~UIWindow() { + delete background; + delete titleBar; } UIElementType UIWindow::getType() { diff --git a/src/kekengine/include/uielements.h b/src/kekengine/include/uielements.h index c4f2799..fae0961 100644 --- a/src/kekengine/include/uielements.h +++ b/src/kekengine/include/uielements.h @@ -132,6 +132,8 @@ class UIWindowTitleBar: public RectangleElement { UIWindowTitleBar(UIValue height); + virtual ~UIWindowTitleBar(); + virtual void dragEnter(UIPoint pos, UIPoint screenPos); virtual void drag(UIPoint pos, UIPoint screenPos); virtual void dragExit(UIPoint pos, UIPoint screenPos);