From ae2a748403f3a4879a759820f7a445e41ee5f9df Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 8 Feb 2022 21:45:10 +0800 Subject: ... --- include/cru/ui/components/Component.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/cru/ui/components/Component.h') diff --git a/include/cru/ui/components/Component.h b/include/cru/ui/components/Component.h index 0b871dc4..e889ae97 100644 --- a/include/cru/ui/components/Component.h +++ b/include/cru/ui/components/Component.h @@ -2,9 +2,11 @@ #include "../Base.h" namespace cru::ui::components { -// In destructor, component should check all owned controls whether it is -// attached to window, if not, destroy them, otherwise it is host's duty to -// destroy them. +/** + * \remarks In destructor, component should first delete all child components + * and then remove root control from its parent (by calling + * Control::RemoveFromParent). Then delete all its root control. + */ class CRU_UI_API Component : public Object { public: Component() = default; -- cgit v1.2.3