{dialog.object}destroyChildComponent Method





The alias of the child component. You must explicitly set the alias of the component to use this function.


Deletes a child UX component from memory.


For use in large applications where you need to be careful about memory usage.

If you have an application with multiple child UX components, either embedded in the layout or opened using Action Javascript, this method can be used to delete the UX from memory when it's no longer needed. UX components that are shown using an action such as Open a UX component are kept in-memory after they've been loaded so they loaded faster on subsequent calls to the action. {dialog.object}.destroyChildComponent() can be used to delete the child UX from memory if it's no longer needed. For example:

//destroy a child UX that was give the alias 'CHILD1' when it was originally opened

To use this method, the child UX component must have an explicit alias (set in the UX alias property when configuring Action Javascript or Component alias property for an embedded UX component object).


Destroy Child UX Component

A common pattern when building large mobile applications is to break the app into multiple sub-component which are called from a master component.

Once the child component is no longer needed, it is useful to be able to delete the component from memory in order to conserve the limited memory available in the browser.

The {dialog.object}.destroyChildComponent() method can be used to delete child UX components from memory, as shown in this video.

Download Component


See Also