diff --git a/haxe/ui/core/Component.hx b/haxe/ui/core/Component.hx index 7a40c3478..20184e8ef 100644 --- a/haxe/ui/core/Component.hx +++ b/haxe/ui/core/Component.hx @@ -694,6 +694,10 @@ class Component extends ComponentImpl LocaleManager.instance.unregisterComponent(this); handleDestroy(); onDestroy(); + if (_compositeBuilder != null) { + @:privateAccess _compositeBuilder._component = null; + } + _compositeBuilder = null; } private function onDestroy() {