# About Component destory

**URL:** <https://tech-community.robotics.abb.com/t/about-component-destory/14992>\
**Category:** AppStudio\
**Created:** [May 30, 2026, 12:18am UTC](https://tech-community.robotics.abb.com/t/about-component-destory/14992 "2026-05-30T00:18:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![liang\_changhong](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@liang\_changhong](https://tech-community.robotics.abb.com/u/liang_changhong)\
**Post date:** [May 30, 2026, 12:18am UTC](https://tech-community.robotics.abb.com/t/about-component-destory/14992/1 "2026-05-30T00:18:34Z")

</div>

The `layoutInfobox` component has multiple child components. When destroying `layoutInfobox`, do its children get destroyed automatically, or do I have to destroy them individually?

I found that `destroy()` cannot truly remove the component from the Instance.

How do I destroy components from the Instance? My app creates a large number of components dynamically, and their properties keep changing constantly. If the components are not destroyed in a timely manner, a great many of them will pile up inside the Instance.

---

<div class="post-metadata">

**Author:** ![yitong](https://avatars.discourse-cdn.com/v4/letter/y/3da27b/32.png) [@yitong](https://tech-community.robotics.abb.com/u/yitong)\
**Post date:** [June 3, 2026, 2:14am UTC](https://tech-community.robotics.abb.com/t/about-component-destory/14992/2 "2026-06-03T02:14:15Z")

</div>

For situations like this with sequential control projects, you might need to try deploying the project in lifecycle mode. [Namespace: Lifecycle](https://abbissp01sastaasblb0749.blob.core.windows.net/appstudioproduct/allApiDocs/1.3.0/apiDocs/introduction/Lifecycle.html)

---

<div class="post-metadata">

**Author:** ![liang\_changhong](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@liang\_changhong](https://tech-community.robotics.abb.com/u/liang_changhong)\
**Post date:** [June 3, 2026, 2:20am UTC](https://tech-community.robotics.abb.com/t/about-component-destory/14992/3 "2026-06-03T02:20:00Z")

</div>

> [@yitong](#):
>
> For situations like this with sequential control projects, you might need to try deploying the project in lifecycle mode

How should I do this specifically? Which method should I use?

---

<div class="post-metadata">

**Author:** ![yitong](https://avatars.discourse-cdn.com/v4/letter/y/3da27b/32.png) [@yitong](https://tech-community.robotics.abb.com/u/yitong)\
**Post date:** [June 3, 2026, 2:37am UTC](https://tech-community.robotics.abb.com/t/about-component-destory/14992/4 "2026-06-03T02:37:32Z")

</div>

Sorry for misunderstanding you. You meant you want to clear the Instance’s large dictionary object when the component is destroyed.

We have provided a method called `onDestory` for custom components and a method called onDispose for basic components, but there’s still a minor issue with the `onDispose` method at the moment…

It is recommended that you set up an event listener when the component is mounted…

```auto
this.once('before:destroy',()=>{
    Logger.i("Input dispose");
    try{
// Which component instance you want to delete.
        delete Instance.Input_8;
    }catch(e){
        Logger.e(e);
    }
})

```

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/6/693f690ecdf64a236ed29a94ab37f984e1a81d07.png)

---

<div class="post-metadata">

**Author:** ![yitong](https://avatars.discourse-cdn.com/v4/letter/y/3da27b/32.png) [@yitong](https://tech-community.robotics.abb.com/u/yitong)\
**Post date:** [June 3, 2026, 2:40am UTC](https://tech-community.robotics.abb.com/t/about-component-destory/14992/5 "2026-06-03T02:40:12Z")

</div>

Currently, AppStudio v1.3.0 recursive destroy between parent and child cannot be achieved…
