!--a11y-->
Use
The lifetime management controls the lifetime of a custom control at the frontend. When a control reaches the end of its lifetime, the R/3 System automatically destroys it at the frontend. The methods
free and finalize are called by the system for the control. However, you can also destroy a control yourself by calling these methods in your program.Features
You set the lifetime of a control when you create the control instance. There are two possible settings:
Using this mode automatically regulates the visibility of the control. Controls are only displayed when the screen on which they were created is active. When other screens are active, the controls are hidden.

When you specify the lifetime of a control, it may be shorter, but never longer, than that of its container.

An instance of a screen is defined as follows:
An instance is created when a screen is placed on the screen stack (for example, using
An instance is destroyed when the next screen is a screen other than that of the current instance (
set screen 200 or set screen 0 ).The lifetime of a control is specified in the attribute
my_control->lifetime .You can use the method
is_alive to find out if an instantiated control still exists at the frontend. The method get_living_dynpro_controls returns a list of all controls that currently exist on the frontend.